diff --git a/lib/Serialization/Serialization.cpp b/lib/Serialization/Serialization.cpp index 054cda2164803..b4b1c6f6bbf97 100644 --- a/lib/Serialization/Serialization.cpp +++ b/lib/Serialization/Serialization.cpp @@ -5601,8 +5601,8 @@ class Serializer::TypeSerializer : public TypeVisitor { 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) { diff --git a/test/Serialization/transitive_conformances_and_cgfloat_double.swift b/test/Serialization/transitive_conformances_and_cgfloat_double.swift new file mode 100644 index 0000000000000..c91fcb5661544 --- /dev/null +++ b/test/Serialization/transitive_conformances_and_cgfloat_double.swift @@ -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) { + 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? = SIMD2(point, point) + } + } + } +} +