Avatar
@tarunon lazyのあるなしでエラーメッセージによるとhogeが B?? と解釈されてるかどうかが変わっているきがするんだけどどう
5:42 PM
そもエラーがどのファイルのどの行って示せていないので、なんかがおかしいのは確定だと思うんだけどな
5:44 PM
class A { weak lazy var hoge: B? = { return B??.none }() } class B {}
5:44 PM
Playground execution failed: error: cannot convert return expression of type 'B?' to return type 'B?' error: MyPlayground.playground:4:30: error: cannot convert value of type 'B??' to specified type 'B?' weak lazy var hoge: B? = { ^ error: cannot assign value of type 'B?' to type 'B??' error: cannot assign value of type 'B?' to type 'B??'
5:44 PM
もっとポンコツっぽくなった