Missing witness table for Comparable.<

i'm trying to update the implementation for the Synthesized Comparable proposal, but i'm running into a strange compiler crash whenever I try to compile a test file:

comparable.(file).Foo@/home/klossy/sandbox/swift/comparable.swift:1:6 is missing witness for Comparable.<
Stack dump:
0.	Program arguments: /home/klossy/dev/swift-compiler/build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-linux-x86_64/bin/swift -frontend -c -primary-file /home/klossy/sandbox/swift/comparable.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -color-diagnostics -module-name comparable -o /tmp/comparable-8dec92.o 
1.	Swift version 5.1-dev (LLVM c5340df2d1, Swift 210ec69a1b)
2.	While walking into decl 'Foo' (at /home/klossy/sandbox/swift/comparable.swift:1:1)
3.	While verifying protocol conformance 'Foo' (at /home/klossy/sandbox/swift/comparable.swift:1:1)
/home/klossy/dev/swift-compiler/build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-linux-x86_64/bin/swift[0x54eab1f]
/home/klossy/dev/swift-compiler/build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-linux-x86_64/bin/swift[0x54e8dd0]
/home/klossy/dev/swift-compiler/build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-linux-x86_64/bin/swift[0x54eb088]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f476472c890]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f4762b8fe97]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f4762b91801]
/home/klossy/dev/swift-compiler/build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-linux-x86_64/bin/swift[0x23d1136]
/home/klossy/dev/swift-compiler/build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-linux-x86_64/bin/swift[0x23d0424]
/home/klossy/dev/swift-compiler/build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-linux-x86_64/bin/swift[0x23cccda]
/home/klossy/dev/swift-compiler/build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-linux-x86_64/bin/swift[0x23af08c]
/home/klossy/dev/swift-compiler/build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-linux-x86_64/bin/swift[0x23e8c01]
/home/klossy/dev/swift-compiler/build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-linux-x86_64/bin/swift[0x23e8b50]
/home/klossy/dev/swift-compiler/build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-linux-x86_64/bin/swift[0x261d05e]
/home/klossy/dev/swift-compiler/build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-linux-x86_64/bin/swift[0x23abbec]
/home/klossy/dev/swift-compiler/build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-linux-x86_64/bin/swift[0x1c1a8a7]
/home/klossy/dev/swift-compiler/build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-linux-x86_64/bin/swift[0xaf61d5]
/home/klossy/dev/swift-compiler/build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-linux-x86_64/bin/swift[0xaf45a1]
/home/klossy/dev/swift-compiler/build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-linux-x86_64/bin/swift[0xaf3a2c]
/home/klossy/dev/swift-compiler/build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-linux-x86_64/bin/swift[0xaf3a8a]
/home/klossy/dev/swift-compiler/build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-linux-x86_64/bin/swift[0x57528e]
/home/klossy/dev/swift-compiler/build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-linux-x86_64/bin/swift[0x574830]
/home/klossy/dev/swift-compiler/build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-linux-x86_64/bin/swift[0x49310a]
/home/klossy/dev/swift-compiler/build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-linux-x86_64/bin/swift[0x4923a3]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f4762b72b97]
/home/klossy/dev/swift-compiler/build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-linux-x86_64/bin/swift[0x4918ba]
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal 6 (use -v to see invocation)

The error is getting thrown from ASTVerifier.cpp which i never touched. The implementation worked fine back in june, but after resolving subsequent merge conflicts i'm now getting this crash. any ideas?

I recently ran into a similar issue with RawRepresentable (see #27050). I think this is happening because the derivation is failing (due to some reason) but you're not generating a diagnostic for it.

1 Like
Terms of Service

Privacy Policy

Cookie Policy