Commits

practicalswift committed daf5e47982d
[swiftc] Add 💥 case (😢 → 54, 😀 → 5091) triggered in swift::Type::print(…) Add crash case with stack trace: ``` swift: /path/to/swift/lib/AST/ASTPrinter.cpp:4061: void (anonymous namespace)::TypePrinter::visitArchetypeType(swift::ArchetypeType *): Assertion `GTD && GTD->isProtocolSelf()' failed. 10 swift 0x00000000010360f1 swift::Type::print(swift::ASTPrinter&, swift::PrintOptions const&) const + 49 16 swift 0x0000000001037480 swift::TypeBase::getString(swift::PrintOptions const&) const + 160 18 swift 0x00000000010d8f5b swift::DiagnosticEngine::emitDiagnostic(swift::Diagnostic const&) + 2923 19 swift 0x00000000010d81cf swift::DiagnosticEngine::flushActiveDiagnostic() + 319 20 swift 0x0000000000f17fd9 swift::TypeChecker::checkIgnoredExpr(swift::Expr*) + 377 23 swift 0x0000000000f1888a swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346 24 swift 0x0000000000f186ee swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46 25 swift 0x0000000000f192b3 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 179 27 swift 0x0000000000ed4851 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1281 28 swift 0x0000000000c62209 swift::CompilerInstance::performSema() + 3289 30 swift 0x00000000007d89b9 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857 31 swift 0x00000000007a49f8 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28335-swift-type-print.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28335-swift-type-print-72fd02.o 1. While type-checking getter for c at validation-test/compiler_crashers/28335-swift-type-print.swift:13:6 <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ```