Files
swift-mirror/test/multifile/Inputs/external_lazy_property.swift
Slava Pestov a6f6dc01bc Sema: Fix order dependency between lazy getter body synthesis and capture computation
If we computed captures before completing a lazy getter body, we would fail to
consider the 'self' capture properly. Instead make it resilient to such ordering
issues by checking in capture computation if the lazy property has a getter yet
or not.
2018-12-07 17:10:15 -05:00

13 lines
168 B
Swift

public struct Test1 {
lazy var property: String = "help"
}
public class Test2 {
var x = 0
var y = 1
lazy var property = {
return [self.x, self.y]
}()
}