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
// expected-error@-1 {{invalid redeclaration of 'NestedAlias}}
116
+
typealiasNestedAlias2=T.Magnitude where T: FixedWidthInteger
117
+
118
+
classNestedClasswhere T:Equatable{}
119
+
}
120
+
121
+
extensionContainerwhere T:Sequence{
122
+
structNestedStruct{}
123
+
124
+
structNestedStruct2where T.Element:Comparable{
125
+
enumNestedEnumwhere T.Element ==Double{} // expected-note {{requirement specified as 'T.Element' == 'Double' [with T = String]}}
126
+
}
127
+
128
+
structNestedStruct3<U:Whereable>{}
129
+
}
130
+
131
+
extensionContainer.NestedStruct3{
132
+
func foo(arg:U)where U.Assoc ==T{}
133
+
}
134
+
135
+
_ =Container<String>.NestedAlias2.self // expected-error {{type 'String' does not conform to protocol 'FixedWidthInteger'}}
136
+
_ =Container<Container<Bool>>.NestedClass.self // expected-error {{type 'Container<Bool>' does not conform to protocol 'Equatable'}}
137
+
_ =Container<Void>.NestedStruct.self // expected-error {{type 'Void' does not conform to protocol 'Sequence'}}
138
+
_ =Container<Array<Void>>.NestedStruct2.self // expected-error {{type 'Void' does not conform to protocol 'Comparable'}}
139
+
_ =Container<String>.NestedStruct2.NestedEnum.self // expected-error {{'Container<String>.NestedStruct2.NestedEnum' requires the types 'String.Element' (aka 'Character') and 'Double' be equivalent}}
0 commit comments