digitalmars.D.bugs - [Issue 15361] New: Incomprehensible error message: function
- via Digitalmars-d-bugs (25/25) Nov 18 2015 https://issues.dlang.org/show_bug.cgi?id=15361
https://issues.dlang.org/show_bug.cgi?id=15361 Issue ID: 15361 Summary: Incomprehensible error message: function declaration without return type. Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: deadalnix gmail.com So I did enum isErrorizable(T) = is(errorize(T.init)); Which, quite obvious, give me the error : function declaration without return type. (Note that constructors are always named 'this') I intended to do enum isErrorizable(T) = is(typeof(errorize(T.init))); but that wasn't really obvious from the error message. Even by writting a D compiler myself, I have no idea how the compiler come to such conclusion that I'm trying to declare a function. --
Nov 18 2015