Can someone explain why this is not an error?
Bernard Helyer
b.helyer at gmail.com
Thu Jul 1 02:49:27 PDT 2010
http://www.digitalmars.com/d/2.0/declaration.html
"In a declaration declaring multiple symbols, all the declarations must
be of the same type:"
Yet this compiles:
---
void main()
{
immutable a = 3, b = 4.2, c = true;
}
---
a, b, and c all have different types. Unless you consider the type as
'type to be inferred'. Can anyone explain this behaviour to me?
More information about the Digitalmars-d
mailing list