Avatar
Avatar
kntk
@swift-6.1.2 @swift-6.2-dev class Super {} class Sub: Super {} let a: () -> () -> Sub = {{ return Sub() }} let _: (() -> () -> Super)? = a (edited)
exit status 1 with stderr:<stdin>:4:31: error: cannot convert value of type '() -> Sub' to specified type '() -> () -> Super' 2 | class Sub: Super {} 3 | let a: () -> () -> Sub = {{ return Sub() }} 4 | let _: (() -> () -> Super)? = a | `- error: cannot convert value of type '() -> Sub' to specified type '() -> () -> Super' 5 |