Using Fire .2525, Android class library
I have an enum:
public enum ConnectionState: String {
case approved, approvalPending, forbidden
}
If I define an array like this:
let values: [ConnectionState] = [.approvalPending, .approved, .forbidden]
it fails to compile with “No matching overload” message. However, the definition below compiles fine:
let values = [ConnectionState.approvalPending, ConnectionState.approved, ConnectionState.forbidden]
If I define a dictionary:
var dictValues = [String: ConnectionState]()
and then try to change it in a method:
func test(_ aState1: ConnectionState, _ aState2: ConnectionState) {
dictValues["state1"] = aState1
dictValues["state2"] = aState2
}
it fails to compile with “Parameter 2 should be ConnectionState?” error.
But, if I put this definition
let values = [ConnectionState.approvalPending, ConnectionState.approved, ConnectionState.forbidden]
before dictValues
definition, the test()
method compiles! Strange.
This only happens with Android project, Echoes project compiles fine.
If I revert to Fire .2513, all the issues go away.
Test project attached.
DictionaryTest.zip (229.4 KB)