Avatar
Avatar
omochimetaru
@swift-main -Xfrontend -enable-experimental-named-opaque-types -Xfrontend -enable-parameterized-protocol-types public protocol P<A> { associatedtype A } struct S1<A>: P {} struct S2<A>: P {} public func makeP() -> <T: P, U: P> (T, U) { return (S1<Int>(), S2<Int>()) } public func useSame<T>(_ a: T, _ b: T) {} func main() { let pair = makeP() useSame(type(of: pair.0).A.self, type(of: pair.1).A.self) }
swiftNightly BOT 5/30/2022 8:53 AM
exit status: 134 with stderr:swift-frontend: /home/build-user/swift/lib/Sema/CSSimplify.cpp:3221: ConstraintSystem::TypeMatchResult swift::constraints::ConstraintSystem::matchDeepEqualityTypes(swift::Type, swift::Type, swift::constraints::ConstraintLocatorBuilder): Assertion `opaque1->getCanonicalInterfaceType(arch1->getInterfaceType())->isEqual( opaque2->getCanonicalInterfaceType(arch2->getInterfaceType()))' failed. Stack dump: 0. Program arguments: /usr/bin/swift-frontend -frontend -interpret - -disable-objc-interop -new-driver-path /usr/bin/swift-driver -enable-experimental-named-opaque-types -enable-parameterized-protocol-types -empty-abi-descriptor -resource-dir /usr/lib/swift -module-name main 1. Swift version 5.7-dev (LLVM aac709978dda363, Swift 8c308d0ff137dde) 2. Compiling with the current language version 3. While evaluating request TypeCheckSourceFileRequest(source_file "<stdin>") 4. While evaluating request TypeCheckFunctionBodyRequest(main.(file).main()@<stdin>:14:6) 5. While type-checking statement at [<stdin>:14:13 - line:17:1] RangeText="{ let pair = makeP() useSame(type(of: pair.0).A.self, type(of: pair.1).A.self) " 6. While type-checking expression at [<stdin>:16:5 - line:16:61] RangeText="useSame(type(of: pair.0).A.self, type(of: pair.1).A.self" Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it): /usr/bin/swift-frontend[0x62f7253] /usr/bin/swift-frontend[0x62f4dfe] /usr/bin/swift-frontend[0x62f75e6] /lib/x86_64-linux-gnu/libpthread.so.0(+0x12980)[0x7f3c6f6d7980] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f3c6d94ae87] /lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f3c6d94c7f1] /lib/x86_64-linux-gnu/libc.so.6(+0x303fa)[0x7f3c6d93c3fa] /lib/x86_64-linux-gnu/libc.so.6(+0x30472)[0x7f3c6d93c472] /usr/bin/swift-frontend[0x13579fe] /usr/bin/swift-frontend[0x137e7d5] /usr/bin/swift-frontend[0x1363e37] /usr/bin/swift-frontend[0x1351451] /usr/bi