Thread overview | |||||
---|---|---|---|---|---|
|
May 07, 2013 [Issue 10038] New: Poor error for undefined variable in template args using UFCS on UDT | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=10038 Summary: Poor error for undefined variable in template args using UFCS on UDT Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: peter.alexander.au@gmail.com --- Comment #0 from Peter Alexander <peter.alexander.au@gmail.com> 2013-05-07 09:48:17 PDT --- -------------------------------- struct S {} int foo(alias A)(S s) { return 1; } int baderror = S().foo!(X); -------------------------------- Error is: bug.d(3): Error: no property 'foo' for type 'S' Ideally would be: bug.d(3): Error: undefined identifier X. This can be quite problematic in large UFCS chain expressions, like what you get when using ranges. A small typo can take quite a while to track down with the current diagnostics. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
May 07, 2013 [Issue 10038] Poor error for undefined variable in template args using UFCS on UDT | ||||
---|---|---|---|---|
| ||||
Posted in reply to Peter Alexander | http://d.puremagic.com/issues/show_bug.cgi?id=10038 bearophile_hugs@eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs@eml.cc --- Comment #1 from bearophile_hugs@eml.cc 2013-05-07 09:51:51 PDT --- I think this is already fixed in the latest beta, it gives: temp.d(3): Error: undefined identifier X, did you mean struct S? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
May 07, 2013 [Issue 10038] Poor error for undefined variable in template args using UFCS on UDT | ||||
---|---|---|---|---|
| ||||
Posted in reply to Peter Alexander | http://d.puremagic.com/issues/show_bug.cgi?id=10038 Andrej Mitrovic <andrej.mitrovich@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrovich@gmail.com --- Comment #2 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-05-07 12:06:37 PDT --- (In reply to comment #1) > I think this is already fixed in the latest beta, it gives: > > temp.d(3): Error: undefined identifier X, did you mean struct S? Yes it's a dup of some recently fixed bug, can't remember the ID though. -- 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