Skip to content

[6.2][Serialization] A temporary fix for LocatableType #82676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/Serialization/Serialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5601,8 +5601,8 @@ class Serializer::TypeSerializer : public TypeVisitor<TypeSerializer> {
llvm_unreachable("error union types do not persist in the AST");
}

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

void visitBuiltinTypeImpl(Type ty) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module %s -o %t

// REQUIRES: objc_interop

// rdar://153461854

import CoreGraphics

@resultBuilder
public struct Builder {
public static func buildBlock<T1>(_ t1: T1) -> (T1) {
return (t1)
}
}

protocol P {
}

struct Proxy: P {
let to: (CGFloat?) -> Void
}

struct Test {
@Builder var proxy: some P {
Proxy { point in
if let point {
let _: SIMD2<Double>? = SIMD2(point, point)
}
}
}
}