Swift: Multiple variable definition in one line

After installing Elements version 9.0 (9.0.97.2071) I’m getting strange errors… The most annoying is that I can’t define more that one variable in the same line. I’ve made five tests:

// Test 1
var A1: String, B1: String

// Test 2
var A2: String = "", B2: String

// Test 3
var A3: String, B3: String = ""

// Test 4
var A4: String = "", B4: String = ""

// Test 5
var A5 = String(""), B5 = String("")

First four tests throws two errors (located in the comma position):
[ul]
li closing bracket expected, got comma[/li]
li Semicolon (:wink: required to separate two statements on the same line[/li]
[/ul]

Test number five is the only way I’ve found to declare two variables in the same line…

I remember that with Elements version 8.3.95.2031 I didn’t have this problems…

Note: I’m using Visual Studio 2015 update 3 under Windows 7 64 bits

More info:

I’ve installed Elements version 9.1.100.2081 (beta). No change: First four tests throws the same errors. Test number five: OK.

I’ve downgraded to version 8.3.95.2031… First four tests: OK. Test number five generates two errors:

[ul]
li No overloaded method “String” with 0 parameters on type “MainActivity” <-- It was an Android project[/li]
li Type mismatch, cannot infer type from expression without result type[/li]
[/ul]

Thanks, logged as bugs://77031

bugs://77031 got closed with status fixed.

1 Like

Logged as bugs://i64801.

bugs://i64801 was closed as fixed.