IDE: Visual Studio X/Fire
Version: 10.0.0.2461 (develop)
Target (If relevant): Island(OSX)
Description:
Swift allows declaring computed “properties”, that is variables with a getter and setter, within a function.
Expected Behavior:
Compiles
Actual Behavior:
See below.
Steps:
func local_properties<T>(_ t: inout T) {
var prop: T { // E504 Semicolon (;) required to separate two statements on the same line
// E120 Statement expected
get {
return t
}
set {
t = newValue
}
}
var foo: Int { 0 } // E504 Semicolon (;) required to separate two statements on the same line
// E120 Statement expected
}