Avatar
stderr:main.swift:12:9: warning: 'is' test is always true print(a is Foo) ^ warning: Swift runtime does not yet support dynamically querying conditional conformance ('Swift.Array<Swift.Int>': 'main.Foo') Could not cast value of type 'Swift.Array<Swift.Int>' (0x7f6f03a20240) to 'main.Foo' (0x7f6f03a20280). #0 0x0000000003f24d64 PrintStackTraceSignalHandler(void*) (/usr/bin/swift+0x3f24d64) #1 0x0000000003f250a6 SignalHandler(int) (/usr/bin/swift+0x3f250a6) #2 0x00007f6f07f2c390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390) #3 0x00007f6f0666b428 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x35428) #4 0x00007f6f0666d02a abort (/lib/x86_64-linux-gnu/libc.so.6+0x3702a) #5 0x00007f6f038fbf13 (/usr/lib/swift/linux/libswiftCore.so+0x39df13) #6 0x00007f6f038f84d9 (/usr/lib/swift/linux/libswiftCore.so+0x39a4d9) #7 0x00007f6f038f852b (/usr/lib/swift/linux/libswiftCore.so+0x39a52b) #8 0x00007f6f038f9a78 _dynamicCastToExistential(swift::OpaqueValue*, swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetExistentialTypeMetadata<swift::InProcess> const*, swift::DynamicCastFlags) (/usr/lib/swift/linux/libswiftCore.so+0x39ba78) #9 0x00007f6f0835b2ad #10 0x00007f6f0835b10e #11 0x0000000000fed1ce llvm::MCJIT::runFunction(llvm::Function*, llvm::ArrayRef<llvm::GenericValue>) (/usr/bin/swift+0xfed1ce) #12 0x0000000000ff1692 llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, char const* const*) (/usr/bin/swift+0xff1692) #13 0x00000000004d9076 swift::RunImmediately(swift::CompilerInstance&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, swift::IRGenOptions&, swift::SILOptions const& (edited)