Avatar
exit status: 134 with stderr:<stdin>:4:7: warning: expression implicitly coerced from 'Animal?' to Any print((Cat() as! AnyObject) as? Animal) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <stdin>:4:29: note: provide a default value to avoid this warning print((Cat() as! AnyObject) as? Animal) ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ ?? <#default value#> <stdin>:4:29: note: force-unwrap the value to avoid this warning print((Cat() as! AnyObject) as? Animal) ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ ! <stdin>:4:29: note: explicitly cast to Any with 'as Any' to silence this warning print((Cat() as! AnyObject) as? Animal) ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ as Any <stdin>:5:7: warning: expression implicitly coerced from 'Cat?' to Any print((Cat() as! AnyObject) as? Cat) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <stdin>:5:29: note: provide a default value to avoid this warning print((Cat() as! AnyObject) as? Cat) ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ ?? <#default value#> <stdin>:5:29: note: force-unwrap the value to avoid this warning print((Cat() as! AnyObject) as? Cat) ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ ! <stdin>:5:29: note: explicitly cast to Any with 'as Any' to silence this warning print((Cat() as! AnyObject) as? Cat) ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ as Any Could not cast value of type 'main.Cat' (0x7fe4e571b100) to 'Swift.AnyObject' (0x7fe4e03ad260). #0 0x0000000003f25074 PrintStackTraceSignalHandler(void*) (/usr/bin/swift+0x3f25074) #1 0x0000000003f253b6 SignalHandler(int) (/usr/bin/swift+0x3f253b6) #2 0x00007fe4e52eb390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390) #3 0x00007fe4e3a2a428 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x35428) #4 0x00007fe4e3a2c02a abort (/lib/x86_64-linux-gnu/libc.so.6+0x3702a) #5 0x00007fe4e0288fd3 (/usr/li (edited)