You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
swift-ci opened this issue
Jan 3, 2017
· 0 comments
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfparserArea → compiler: The legacy C++ parser
Apple Swift version 3.0.2 (swiftlang-800.0.63 clang-800.0.42.1)
Additional Detail from JIRA
Votes
0
Component/s
Compiler
Labels
Bug, Parser
Assignee
None
Priority
Medium
md5: da00fcd99d2bb587f7729bf7294b6de2
duplicates:
SR-349 Cannot use nested enums in definition of arrays or as dictionary
Issue Description:
If you declare a struct, enum or class inside another struct, enum or class, it is not possible to refer to the metatype of an array type containing it using square bracket array literals. So [SomeClass.SomeEnum].type doesn't work, and one must instead use Array<SomeClass.SomeEnum>.type
Examples
Let's set up some types and a generic function that takes a metatype as a parameter.
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfparserArea → compiler: The legacy C++ parser
Environment
Apple Swift version 3.0.2 (swiftlang-800.0.63 clang-800.0.42.1)
Additional Detail from JIRA
md5: da00fcd99d2bb587f7729bf7294b6de2
duplicates:
Issue Description:
If you declare a struct, enum or class inside another struct, enum or class, it is not possible to refer to the metatype of an array type containing it using square bracket array literals. So
[SomeClass.SomeEnum].type
doesn't work, and one must instead useArray<SomeClass.SomeEnum>.type
Examples
Let's set up some types and a generic function that takes a metatype as a parameter.
Example 1
The first example shows that the compiler parsed the parameter to the function completely wrong:
The text was updated successfully, but these errors were encountered: