Uploaded image for project: 'Swift'
  1. Swift
  2. SR-5014

Assertion failure: "failed to find PA's conformance to known protocol"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Done
    • Component/s: Compiler
    • Labels:

      Description

      struct Version {
      }
      
      extension CountableRange where Bound == Version {
          func contains(_ element: Version) -> Bool {
              fatalError()
          }
      }
      
      $ swift main.swift
      
      Assertion failed: (conformance && "failed to find PA's conformance to known protocol"), function operator(), file /Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift/lib/AST/GenericSignatureBuilder.cpp, line 1955.
      0  swift                    0x000000010c84fab8 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
      1  swift                    0x000000010c84ea86 llvm::sys::RunSignalHandlers() + 86
      2  swift                    0x000000010c850079 SignalHandler(int) + 361
      3  libsystem_platform.dylib 0x00007fff9d348b3a _sigtramp + 26
      4  libsystem_platform.dylib 0x0000000000000010 _sigtramp + 1657500912
      5  libsystem_c.dylib        0x00007fff9d1cd420 abort + 129
      6  libsystem_c.dylib        0x00007fff9d194893 basename_r + 0
      7  swift                    0x000000010a649ba6 swift::ProtocolConformanceRef llvm::function_ref<swift::ProtocolConformanceRef (swift::ProtocolDecl*)>::callback_fn<swift::GenericSignatureBuilder::PotentialArchetype::updateNestedTypeForConformance(llvm::PointerUnion<swift::AssociatedTypeDecl*, swift::TypeAliasDecl*>, swift::GenericSignatureBuilder::PotentialArchetype::NestedTypeUpdate)::$_12>(long, swift::ProtocolDecl*) + 470
      8  swift                    0x000000010a6358b1 concretizeNestedTypeFromConcreteParent(swift::GenericSignatureBuilder::PotentialArchetype*, swift::GenericSignatureBuilder::RequirementSource const*, swift::GenericSignatureBuilder::PotentialArchetype*, swift::GenericSignatureBuilder&, llvm::function_ref<swift::ProtocolConformanceRef (swift::ProtocolDecl*)>) + 289
      9  swift                    0x000000010a634d84 swift::GenericSignatureBuilder::PotentialArchetype::updateNestedTypeForConformance(llvm::PointerUnion<swift::AssociatedTypeDecl*, swift::TypeAliasDecl*>, swift::GenericSignatureBuilder::PotentialArchetype::NestedTypeUpdate) + 2452
      10 swift                    0x000000010a63805d swift::GenericSignatureBuilder::resolve(llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::FloatingRequirementSource) + 173
      11 swift                    0x000000010a63c372 swift::GenericSignatureBuilder::addTypeRequirement(llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::FloatingRequirementSource, swift::GenericSignatureBuilder::UnresolvedHandlingKind) + 738
      12 swift                    0x000000010a63a0b5 swift::GenericSignatureBuilder::addRequirement(swift::Requirement const&, swift::GenericSignatureBuilder::FloatingRequirementSource, swift::ModuleDecl*, swift::SubstitutionMap const*) + 869
      13 swift                    0x000000010a638a23 swift::GenericSignatureBuilder::addConformanceRequirement(swift::GenericSignatureBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::GenericSignatureBuilder::RequirementSource const*) + 387
      14 swift                    0x000000010a63c466 swift::GenericSignatureBuilder::addTypeRequirement(llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::FloatingRequirementSource, swift::GenericSignatureBuilder::UnresolvedHandlingKind) + 982
      15 swift                    0x000000010a63a0b5 swift::GenericSignatureBuilder::addRequirement(swift::Requirement const&, swift::GenericSignatureBuilder::FloatingRequirementSource, swift::ModuleDecl*, swift::SubstitutionMap const*) + 869
      16 swift                    0x000000010a647051 swift::GenericSignatureBuilder::InferRequirementsWalker::walkToTypePost(swift::Type) + 241
      17 swift                    0x000000010a6a074c swift::Type::walk(swift::TypeWalker&) const + 76
      18 swift                    0x000000010a63ebc1 swift::GenericSignatureBuilder::inferRequirements(swift::ModuleDecl&, swift::TypeLoc, swift::GenericSignatureBuilder::FloatingRequirementSource) + 97
      19 swift                    0x000000010a4e4c2c void llvm::function_ref<void (swift::GenericSignatureBuilder&)>::callback_fn<checkExtensionGenericParams(swift::TypeChecker&, swift::ExtensionDecl*, swift::Type, swift::GenericParamList*)::$_38>(long, swift::GenericSignatureBuilder&) + 140
      20 swift                    0x000000010a4f22f6 swift::TypeChecker::checkGenericEnvironment(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, bool, llvm::function_ref<void (swift::GenericSignatureBuilder&)>) + 630
      21 swift                    0x000000010a4cafea checkExtensionGenericParams(swift::TypeChecker&, swift::ExtensionDecl*, swift::Type, swift::GenericParamList*) + 170
      22 swift                    0x000000010a4bf520 swift::TypeChecker::validateExtension(swift::ExtensionDecl*) + 320
      23 swift                    0x000000010a4d399e (anonymous namespace)::DeclChecker::visitExtensionDecl(swift::ExtensionDecl*) + 30
      24 swift                    0x000000010a4c4b64 (anonymous namespace)::DeclChecker::visit(swift::Decl*) + 260
      25 swift                    0x000000010a4c4a54 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 100
      26 swift                    0x000000010a5498f4 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1556
      27 swift                    0x000000010a09cc50 swift::CompilerInstance::performSema() + 3616
      28 swift                    0x0000000109635e9b performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 2427
      29 swift                    0x000000010963444a swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2650
      30 swift                    0x00000001095f0f40 main + 3312
      31 libdyld.dylib            0x00007fff9d139235 start + 1
      Stack dump:
      

        Attachments

          Activity

            People

            • Assignee:
              slavapestov Slava Pestov
              Reporter:
              aciid Ankit Aggarwal
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: