Hello,

class C {int i;}
void main () {
    auto c = C(i);
}
__trials__.d(31): Error: no property 'opCall' for type '__trials__.C'

Is there a way for the compiler to detect the missing "new" and write a more 
appropriate message? (Or maybe add a hint in parens? "(Did you try to 
initialise a class instance without 'new'?)")

Also: would it be sensible to make the default opCall for classes precisely 
instance creation? What do you think?


Denis
-- -- -- -- -- -- --
vit esse estrany ☣

spir.wikidot.com

Reply via email to