File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
validation-test/compiler_crashers_2_fixed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -1188,7 +1188,9 @@ bool DeclContext::hasValueSemantics() const {
1188
1188
bool DeclContext::isClassConstrainedProtocolExtension () const {
1189
1189
if (getExtendedProtocolDecl ()) {
1190
1190
auto ED = cast<ExtensionDecl>(this );
1191
- return ED->getGenericSignature ()->requiresClass (ED->getSelfInterfaceType ());
1191
+ if (auto sig = ED->getGenericSignature ()) {
1192
+ return sig->requiresClass (ED->getSelfInterfaceType ());
1193
+ }
1192
1194
}
1193
1195
return false ;
1194
1196
}
Original file line number Diff line number Diff line change
1
+ // RUN: not %target-swift-frontend -typecheck %s
2
+
3
+ struct MyStruct { }
4
+ protocol MyProtocol { }
5
+
6
+ func foo( bytes: [ MyStruct ] ) {
7
+ bytes. withUnsafeBufferPointer { a in
8
+ extension MyProtocol {
9
+ var bytes : MyStruct {
10
+ fatalError( )
11
+ }
12
+ }
13
+ }
14
+ }
You can’t perform that action at this time.
0 commit comments