Avatar
https://forums.swift.org/t/array-compiles-to-array-of-type/45742 @swift-5.3.3 let foo = Array {} print(type(of: foo))
So I just found this out. Not sure if it's a bug or somehow expected behavior. let foo = Array {} The code above works, and foo is inferred to be of type Array<() -> ()> aka [() -> ()] with a single element inside: an empty closure () -> () (which I assume is our {}). Digging deeper into which initializer is responsible for the instantiation,...