April 21, 2012 [Issue 7958] New: Uniform Function Call fails if class defined in unittest body | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=7958 Summary: Uniform Function Call fails if class defined in unittest body Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: thelastmammoth@gmail.com --- Comment #0 from thelastmammoth@gmail.com 2012-04-20 23:30:22 PDT --- //this works class A{ int x; } int fun(A a){return a.x;} void main(){A a=new A; auto x=a.fun;} //this doesn't work: unittest{ class A{ int x; } int fun(A a){return a.x;} A a=new A; auto x=a.fun; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
April 25, 2012 [Issue 7958] Uniform Function Call fails if class defined inside a function | ||||
---|---|---|---|---|
| ||||
Posted in reply to thelastmammoth@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=7958 --- Comment #1 from thelastmammoth@gmail.com 2012-04-25 00:34:07 PDT --- EDIT: more importantly, it also fails if fun() is defined inside a function: //this doesn't work: class A{ int x; } void myfunction(){ int fun(A a){return a.x;} A a=new A; auto x=a.fun; //fails } -- 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