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 {
11881188bool DeclContext::isClassConstrainedProtocolExtension () const {
11891189 if (getExtendedProtocolDecl ()) {
11901190 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+ }
11921194 }
11931195 return false ;
11941196}
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