You'd better sharing some of you code here first.

Zhaoxin

On Tue, Jul 5, 2016 at 1:04 AM, J.E. Schotsman via swift-users <
[email protected]> wrote:

> Hello,
>
> I need to initialize a variable of a class with a closure using the value
> of some variables of the class.
> Since this is not permitted I thought I might solve the problem by
> declaring it lazy. But this is still rejected by the compiler.
> If there are no circular dependencies in initialization of lazy variables
> this could be allowed, couldn’t it?
> Or is this a very big if?
>
> My workaround is ugly: a calculated property + a private variable + an
> initialized:Bool variable.
>
> Jan E.
>
>
> _______________________________________________
> swift-users mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-users
>
_______________________________________________
swift-users mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to