What are the constraints of Swift's array syntax? -


i'm working through exercises in the swift programming language, , 1 thing noted odd array syntax.

per this answer, array<t.generator.element>() works, yet var common = [t.generator.element]() not. @ same time, var common: [t.generator.element] = [] correct.

what rules around array syntax/initialization? why doesn't second line work?


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -