IDE:Visual Studio X/Fire Version:10.0.0.2459 (develop) Target (If relevant): Island(OSX) Description:
The compiler emits various errors for use of Void and () that are incorrect.
Although all of these cases are trivial, the compiler shouldn’t forbid them.
Expected Behavior:
Compiles. Actual Behavior:
See below. Steps:
let x: () = () // E62 Type mismatch, cannot assign "<tuple literal>" to "Void"
let y: Void = () // E503 Tuples require .NET v4.0
let z = () // E503 Tuples require .NET v4.0
let w: () // E96 Internal type "Void" cannot be used directly
func foo(x: () ) { // E96 Internal type "Void" cannot be used directly
}
foo(x: ()) // E503 Tuples require .NET v4.0
func bar(x: Void ) {
}
bar(x: ()) // E503 Tuples require .NET v4.0