mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The source range of the getter's body was set incorrectly; both the start and the end were the property's location. Instead, let's use the source range of the initializer expression, which fixes an assertion in name lookup. Fixes <rdar://problem/70732736>.
16 lines
247 B
Swift
16 lines
247 B
Swift
// RUN: %target-swift-frontend -emit-ir %s
|
|
|
|
struct Horse {}
|
|
|
|
class Reproducer {
|
|
lazy var barn: Any = {
|
|
class Barn {
|
|
var horse: Horse {
|
|
return Horse()
|
|
}
|
|
}
|
|
return Barn()
|
|
}()
|
|
}
|
|
|