http://d.puremagic.com/issues/show_bug.cgi?id=5184
Summary: throw ClassName.templatedStaticMethod(...) cannot be parsed Product: D Version: D1 & D2 Platform: All OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: k...@kmonos.net --- Comment #0 from Kazuhiro Inaba <k...@kmonos.net> 2010-11-07 01:18:51 PST --- The following code doesn't compile (in dmd 2.050 and 1.065), but I think it should. class Factory { static Exception create(T)(T x) { return new Exception("whatever"); } } void main() { throw Factory.create(123); } Error message is the following: > test.d(11): Error: type Factory is not an expression Either one of the changes dissolves the compilation failure: - Changing the method declaration into a non-template create(int x) - Decomposing the throw statement as auto e = Factory.create(123); throw e; The combination of throw+static+template seems causing a trouble. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------