Commit Graph

1 Commits

Author SHA1 Message Date
Slava Pestov
6d6fba5757 Sema: Don't visit local types when computing captures
Ordinarily in valid code, pattern binding initializers in local types cannot
capture anything from the outer scope. However one exception is lazy property
initializers, which can reference the lazy property initializer context's
'self' parameter.

If we computed captures for the outer function before synthesizing the lazy
property getter, we would think that the 'self' parameter was a capture of
the outer function, with hilarious results.

Fixes <rdar://problem/54712320>.
2019-10-01 21:01:31 -04:00