Named Subscript parameters

silver
(Dante Broggi) #1

IDE: Visual Studio X/Fire
Version: 10.0.0.2399 (develop)
Target (If relevant): OSX
Description:
Subscript declarations with named parameters are accepted, but the parser cannot parse them being called.

Expected Behavior:
Compiles.
Actual Behavior:
“E: closing block expected, got colon [<file> (<line>)]”
Steps:

struct F {
    subscript(x y: Int) -> Int {
        return y
    }
}
let f = F()
f[x: 5] // Error Here
(RemObjects) #2

Thanks, logged as bugs://82585

(RemObjects) #3

bugs://82585 got closed with status fixed.