[Issue 15361] New: Incomprehensible error message: function declaration without return type.
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Nov 18 23:28:04 PST 2015
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 at puremagic.com
Reporter: deadalnix at 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.
--
More information about the Digitalmars-d-bugs
mailing list