In C#, the following type-inference works:
But why can't the type be inferred when the variable is a constant?
The following throws a compile-time exception
mobdro:
Code:
const var s = "abcd"; // <= Compile time error:
// Implicitly-typed local variables cannot be constant