File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -1270,11 +1270,6 @@ AbstractionPattern::getFunctionThrownErrorType(
12701270 if (!substErrorType)
12711271 return llvm::None;
12721272
1273- if (!(*substErrorType)->isEqual (ctx.getErrorExistentialType ())) {
1274- llvm::errs () << " unsupported reabstraction\n " ;
1275- abort ();
1276- }
1277-
12781273 return std::make_pair (AbstractionPattern (*substErrorType),
12791274 (*substErrorType)->getCanonicalType ());
12801275 }
Original file line number Diff line number Diff line change 77// XFAIL: CPU=arm64e
88// REQUIRES: PTRSIZE=64
99
10- enum MyBigError : Error {
10+ public enum MyBigError : Error {
1111 case epicFail
1212}
1313
@@ -22,6 +22,10 @@ func createsP() {
2222 requiresP ( X . self)
2323}
2424
25+ // This is for TypeH.method
26+ // CHECK-NOMANGLE: @"$s12typed_throws5TypeHV6methodySSSiAA10MyBigErrorOYKcvpMV" =
27+
28+
2529// CHECK-LABEL: define {{.*}}hidden swiftcc ptr @"$s12typed_throws13buildMetatypeypXpyF"()
2630func buildMetatype( ) -> Any . Type {
2731 typealias Fn = ( Int ) throws ( MyBigError ) -> Void
@@ -78,3 +82,8 @@ func callee() throws (S) {
7882func testit( ) throws ( S) {
7983 try callee ( )
8084}
85+
86+ // Used to crash in abstract pattern creation.
87+ public struct TypeH {
88+ public var method : ( Int ) throws ( MyBigError ) -> String
89+ }
You can’t perform that action at this time.
0 commit comments