Is this a bug in swift?
This compiles fine
var stops = [
["stop": "1", "filterName": ["ND 101", "ND 0.3", "ND2"]],
["stop": "2", "filterName": ["ND 102", "ND 0.6", "ND4"]],
["stop": "3", "filterName": ["ND 103", "ND 0.9", "ND8"]],
["stop": "4", "filterName": ["ND 104", "ND 1.2", "ND16"]],
["stop": "5", "filterName": ["ND 105", "ND 1.5", "ND32"]]
]
This will not
var stops = [
["stop": "1", "filterName": ["ND 101", "ND 0.3", "ND2"]],
["stop": "2", "filterName": ["ND 102", "ND 0.6", "ND4"]],
["stop": "3", "filterName": ["ND 103", "ND 0.9", "ND8"]],
["stop": "4", "filterName": ["ND 104", "ND 1.2", "ND16"]],
["stop": "5", "filterName": ["ND 105", "ND 1.5", "ND32"]],
["stop": "6", "filterName": ["ND 106", "ND 1.8", "ND64"]]
]
It does not result in an error, but hangs when trying to compile saying its indexing.
I have to get around this by doing...
var stops = [
["stop": "1", "filterName": ["ND 101", "ND 0.3", "ND2"]],
["stop": "2", "filterName": ["ND 102", "ND 0.6", "ND4"]],
["stop": "3", "filterName": ["ND 103", "ND 0.9", "ND8"]],
["stop": "4", "filterName": ["ND 104", "ND 1.2", "ND16"]],
["stop": "5", "filterName": ["ND 105", "ND 1.5", "ND32"]]
]
self.stops += [
["stop": "6", "filterName": ["ND 106", "ND 1.8", "ND64"]],
["stop": "6 2/3", "filterName": [ "ND 2.0", "ND100"]],
["stop": "7", "filterName": ["ND 107", "ND 2.1", "ND128"]],
["stop": "8", "filterName": ["ND 108", "ND 2.4", "ND256"]],
["stop": "8 2/3", "filterName": ["ND400"]]
]
self.stops += [
["stop": "9", "filterName": ["ND 109", "ND 2.7", "ND512"]],
["stop": "10", "filterName": ["ND 110", "ND 3.0", "ND1024 (aka ND1000)"]],
["stop": "11", "filterName": ["ND 111", "ND 3.3", "ND2048"]],
["stop": "12", "filterName": ["ND 112", "ND 3.6", "ND4096"]],
["stop": "12 2/3", "filterName": ["ND 3.8", "ND6310"]]
]
self.stops += [
["stop": "13 1/3", "filterName": ["ND 4.0", "ND8192"]],
["stop": "13", "filterName": ["ND 113", "ND 3.9", "ND10000"]],
["stop": "16 2/3", "filterName": ["ND 5.0", "ND100000"]]
]
which seems a bit hacky.
Is this a known issue, or am I doing something incorrectly here?