Files
swift-mirror/validation-test/compiler_crashers_2_fixed/rdar70732736.swift
Slava Pestov 756357b8a2 Sema: Fix source range of 'lazy' property getter
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>.
2020-11-16 23:46:11 -05:00

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()
}()
}