mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Mangling a non-canonical type can run into unexpected type sugar such as the newly introduced LocatableType. USRs should be based on canonical types anyway, so make sure we canonicalize before mangling. rdar://141168628
17 lines
383 B
Swift
17 lines
383 B
Swift
@resultBuilder struct Builder {
|
|
static func buildBlock<T>(_ x: T) -> T { x }
|
|
}
|
|
|
|
struct S {}
|
|
|
|
struct R<T> {
|
|
init(@Builder fn: () -> T) {}
|
|
}
|
|
|
|
// rdar://141168628 - Make sure we can compute the USR here without crashing.
|
|
R {
|
|
S()
|
|
// RUN: %sourcekitd-test -req=conformingmethods -pos %(line + 1):2 %s -- %s | %FileCheck %s
|
|
}
|
|
// CHECK: key.typeusr: "$s13rdar1411686281RVyAA1SVGD"
|