[Issue 1251] New: Final template class w/ constructor and invariant causes compile error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed May 30 23:53:01 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1251
Summary: Final template class w/ constructor and invariant causes
compile error
Product: D
Version: 1.014
Platform: PC
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P3
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: dhaffey at gmail.com
The following code:
final class Foo()
{
this() {}
invariant {}
}
alias Foo!() Bar;
Provokes this error message:
Error: cannot modify final variable '__result'
It compiles without issue if I remove the final attribute, the constructor, the
invariant, make Foo a non-template class, or use the full template syntax
instead of the class template shortcut.
--
More information about the Digitalmars-d-bugs
mailing list