[Issue 5295] New: Template basename recognized as valid type inside template - shouldn't be.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Dec 1 03:47:28 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5295
Summary: Template basename recognized as valid type inside
template - shouldn't be.
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: ah08010-d at yahoo.com
--- Comment #0 from Austin Hastings <ah08010-d at yahoo.com> 2010-12-01 03:45:56 PST ---
This code runs with dmd -run under 2.49. Note the array C[], which I don't
think is valid. (If this IS considered valid, can someone explain the semantics
to me?)
======
module scratch;
class C(T) {
C[] ary;
void foo() {
foreach( a; ary ) {
a.bar();
}
}
void bar() {
}
}
void main() {
auto c = new C!int;
c.foo();
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list