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

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

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

javascript - Restarting Supervisor and effect on FlaskSocketIO -