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(
1270
1270
if (!substErrorType)
1271
1271
return llvm::None;
1272
1272
1273
- if (!(*substErrorType)->isEqual (ctx.getErrorExistentialType ())) {
1274
- llvm::errs () << " unsupported reabstraction\n " ;
1275
- abort ();
1276
- }
1277
-
1278
1273
return std::make_pair (AbstractionPattern (*substErrorType),
1279
1274
(*substErrorType)->getCanonicalType ());
1280
1275
}
Original file line number Diff line number Diff line change 7
7
// XFAIL: CPU=arm64e
8
8
// REQUIRES: PTRSIZE=64
9
9
10
- enum MyBigError : Error {
10
+ public enum MyBigError : Error {
11
11
case epicFail
12
12
}
13
13
@@ -22,6 +22,10 @@ func createsP() {
22
22
requiresP ( X . self)
23
23
}
24
24
25
+ // This is for TypeH.method
26
+ // CHECK-NOMANGLE: @"$s12typed_throws5TypeHV6methodySSSiAA10MyBigErrorOYKcvpMV" =
27
+
28
+
25
29
// CHECK-LABEL: define {{.*}}hidden swiftcc ptr @"$s12typed_throws13buildMetatypeypXpyF"()
26
30
func buildMetatype( ) -> Any . Type {
27
31
typealias Fn = ( Int ) throws ( MyBigError ) -> Void
@@ -78,3 +82,8 @@ func callee() throws (S) {
78
82
func testit( ) throws ( S) {
79
83
try callee ( )
80
84
}
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