Skip to content

Commit 2d06a61

Browse files
authored
Merge pull request #82676 from xedin/rdar-153461854-serialization-fix-6.2
[6.2][Serialization] A temporary fix for `LocatableType`
2 parents eff0845 + 9b27b45 commit 2d06a61

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

lib/Serialization/Serialization.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5601,8 +5601,8 @@ class Serializer::TypeSerializer : public TypeVisitor<TypeSerializer> {
56015601
llvm_unreachable("error union types do not persist in the AST");
56025602
}
56035603

5604-
void visitLocatableType(const LocatableType *) {
5605-
llvm_unreachable("locatable types do not persist in the AST");
5604+
void visitLocatableType(const LocatableType *LT) {
5605+
visit(LT->getSinglyDesugaredType());
56065606
}
56075607

56085608
void visitBuiltinTypeImpl(Type ty) {
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module %s -o %t
2+
3+
// REQUIRES: objc_interop
4+
5+
// rdar://153461854
6+
7+
import CoreGraphics
8+
9+
@resultBuilder
10+
public struct Builder {
11+
public static func buildBlock<T1>(_ t1: T1) -> (T1) {
12+
return (t1)
13+
}
14+
}
15+
16+
protocol P {
17+
}
18+
19+
struct Proxy: P {
20+
let to: (CGFloat?) -> Void
21+
}
22+
23+
struct Test {
24+
@Builder var proxy: some P {
25+
Proxy { point in
26+
if let point {
27+
let _: SIMD2<Double>? = SIMD2(point, point)
28+
}
29+
}
30+
}
31+
}
32+

0 commit comments

Comments
 (0)