Commit Graph

3 Commits

Author SHA1 Message Date
Hamish Knight
59885c474f [test] Add a lazy local test case
This hit an assertion I was trying to add to make
sure we don't try to recursively type-check when
type-checking a closure. Currently we can end up
type-checking the initializer for `x` while generating
constraints for the closure due to the fact that we
eagerly compute the interface type for the backing
lazy storage var. We ought to make that computation
lazy, but in the mean time, add this test case.
2024-09-17 12:35:11 +01:00
Slava Pestov
ddb8ed8d11 Sema: Fix crash with local 'lazy' variables that contain a closure
There was some bogus logic here that's no longer necessary.

Fixes https://bugs.swift.org/browse/SR-14271 / rdar://problem/74747109.
2021-03-05 15:45:21 -05:00
Slava Pestov
ed247a1fa1 Sema: Allow 'lazy' local variables 2021-02-06 08:56:38 -05:00