> On Mar 13, 2017, at 10:56 AM, rintaro ishizaki via swift-evolution 
> <[email protected]> wrote:
> 
> final class First {
>     let item: First
>     init(item: First) {
>         self.item = item
>     }
> }
> 
> extension First {
>     convenience init() {
>         self.init(item: self)
>     }
> }
> 
> let a = First()
> 
> I'm actually a bit surprised that this compiles.
> This should be diagnosed as: "error: 'self' used before self.init call" I 
> think.

Yes, it should.

John.

> 
> 
> 2017-03-13 23:42 GMT+09:00 Dimitri Racordon <[email protected] 
> <mailto:[email protected]>>:
> But then!
> 
> The following still shouldn’t compile:
> 
> final class First {
>     let item: First
>     init(item: First) {
>         self.item = item
>     }
> }
> 
> 
> 
> 
> _______________________________________________
> swift-evolution mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-evolution

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to