September 13, 2013 [Issue 11019] New: fwd reference : legal in C++, CT error in D (unable to resolve forward reference in definition) | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=11019 Summary: fwd reference : legal in C++, CT error in D (unable to resolve forward reference in definition) Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: critical Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: thelastmammoth@gmail.com --- Comment #0 from thelastmammoth@gmail.com 2013-09-12 20:25:16 PDT --- /* g++ -c main.cpp #OK */ class D; class A { public: A* View(){ return (A*)0; } }; class B : A{ public: D* View() { return (D*)0;} }; class D : B{ }; ---------------- dmd main.d: Error: class tests.test_multi.B unable to resolve forward reference in definition (and line number is at class declaration (line HERE) instead of offending location (line HERE+1) ) class A { public A View(){ return null; } } class B : A{ //line HERE public D View() { return null;} } class D : B{ } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation