-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of software
Description
Previous ID | SR-4896 |
Radar | rdar://problem/32205515 |
Original Reporter | @dabrahams |
Type | Bug |
Status | Resolved |
Resolution | Done |
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Bug, CompilerCrash |
Assignee | @ematejska |
Priority | Medium |
md5: 028a9ad878a1302d7e919a9e9fd1c074
relates to:
- SR-4894 Assertion failed: (!refType->hasTypeParameter() && "Cannot have a dependent type here"), function resolveOverload
Issue Description:
$ git fetch https://github.com/dabrahams/swift refs/bugs/replacement-requires-looking-up-a-concrete-conformance:BUG && git checkout BUG
Now build validation-test/compiler_crashers_fixed/28666-conformingreplacementtype-is-substitutabletype-conformingreplacementtype-is-depe.swift
******************** TEST 'Swift(linux-x86_64) :: compiler_crashers_fixed/28666-conformingreplacementtype-is-substitutabletype-conformingreplacementtype-is-depe.swift' FAILED ********************
12:57:55 Script:
12:57:55 --
12:57:55 not /home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift -frontend -target x86_64-unknown-linux-gnu -module-cache-path '/tmp/swift-testsuite-clang-module-cacheeo9JhH' -swift-version 3 /home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/swift/validation-test/compiler_crashers_fixed/28666-conformingreplacementtype-is-substitutabletype-conformingreplacementtype-is-depe.swift -emit-ir
12:57:55 --
12:57:55 Exit Code: 1
12:57:55
12:57:55 Command Output (stderr):
12:57:55 --
12:57:55
/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/swift/validation-test/compiler_crashers_fixed/28666-conformingreplacementtype-is-substitutabletype-conformingreplacementtype-is-depe.swift:10:1: error: expected '}' in struct
12:57:55
12:57:55 ^
12:57:55 /home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/swift/validation-test/compiler_crashers_fixed/28666-conformingreplacementtype-is-substitutabletype-conformingreplacementtype-is-depe.swift:9:36: note: to match this opening '{'
12:57:55 struct A:RangeReplaceableCollection{var f=max
12:57:55 ^
12:57:55 /home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/swift/validation-test/compiler_crashers_fixed/28666-conformingreplacementtype-is-substitutabletype-conformingreplacementtype-is-depe.swift:9:8: error: type 'A' does not conform to protocol 'RangeReplaceableCollection'
12:57:55 struct A:RangeReplaceableCollection{var f=max
12:57:55 ^
12:57:55 /home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/swift/validation-test/compiler_crashers_fixed/28666-conformingreplacementtype-is-substitutabletype-conformingreplacementtype-is-depe.swift:9:8: error: type 'A' does not conform to protocol '_RangeReplaceableIndexable'
12:57:55 struct A:RangeReplaceableCollection{var f=max
12:57:55 ^
12:57:55 Swift.RangeReplaceableCollection:17:24: note: candidate has non-matching type '(repeating: Self.Element, count: Int)'
12:57:55 public convenience init(repeating repeatedValue: Self.Element, count: Int)
12:57:55 ^
12:57:55 /home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/swift/validation-test/compiler_crashers_fixed/28666-conformingreplacementtype-is-substitutabletype-conformingreplacementtype-is-depe.swift:9:8: error: type 'A' does not conform to protocol 'Collection'
12:57:55 struct A:RangeReplaceableCollection{var f=max
12:57:55 ^
12:57:55 /home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/swift/validation-test/compiler_crashers_fixed/28666-conformingreplacementtype-is-substitutabletype-conformingreplacementtype-is-depe.swift:9:8: error: type 'A' does not conform to protocol '_IndexableBase'
12:57:55 struct A:RangeReplaceableCollection{var f=max
12:57:55 ^
12:57:55 Swift._IndexableBase:9:20: note: unable to infer associated type 'Index' for protocol '_IndexableBase'
12:57:55 associatedtype Index : Comparable
12:57:55 ^
12:57:55 Swift._Indexable:2:12: note: inferred type 'R' (by matching requirement 'subscript') is invalid: does not conform to 'Comparable'
12:57:55 public subscript(r: R) -> Self.SubSequence { get }
12:57:55 ^
12:57:55 Swift._Indexable:3:12: note: inferred type '(UnboundedRange_) -> ()' (by matching requirement 'subscript') is invalid: does not conform to 'Comparable'
12:57:55 public subscript(x: (UnboundedRange_) -> ()) -> Self.SubSequence { get }
12:57:55 ^
12:57:55 Swift.RangeReplaceableCollection:49:20: note: protocol requires nested type 'SubSequence'; do you want to add it?
12:57:55 associatedtype SubSequence : _RangeReplaceableIndexable = RangeReplaceableSlice<Self>
12:57:55 ^
12:57:55 Swift._RangeReplaceableIndexable:18:12: note: protocol requires initializer 'init(repeating:count:)' with type '(repeating: A._Element, count: Int)'; do you want to add a stub?
12:57:55 public init(repeating repeatedValue: Self._Element, count: Int)
12:57:55 ^
12:57:55 Swift.Collection:222:20: note: protocol requires nested type 'SubSequence'; do you want to add it?
12:57:55 associatedtype SubSequence : _IndexableBase, Sequence = Slice<Self> where Self.Element == Self.SubSequence.Element, Self.SubSequence == Self.SubSequence.SubSequence
12:57:55 ^
12:57:55 swift: /home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/swift/lib/AST/Type.cpp:3012: Optional<swift::ProtocolConformanceRef> swift::MakeAbstractConformanceForGenericType::operator()(swift::CanType, swift::Type, swift::ProtocolType *) const: Assertion `(conformingReplacementType->is<SubstitutableType>() || conformingReplacementType->is<DependentMemberType>()) && "replacement requires looking up a concrete conformance"' failed.
12:57:55 #​0 0x0000000003a40da8 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x3a40da8)
12:57:55 #​1 0x0000000003a414e6 SignalHandler(int) (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x3a414e6)
12:57:55 #​2 0x00007f60792763e0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x113e0)
12:57:55 #​3 0x00007f60779b6428 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x35428)
12:57:55 #​4 0x00007f60779b802a abort (/lib/x86_64-linux-gnu/libc.so.6+0x3702a)
12:57:55 #​5 0x00007f60779aebd7 (/lib/x86_64-linux-gnu/libc.so.6+0x2dbd7)
12:57:55 #​6 0x00007f60779aec82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
12:57:55 #​7 0x000000000159c349 (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x159c349)
12:57:55 #​8 0x00000000005794e9 llvm::Optional<swift::ProtocolConformanceRef> llvm::function_ref<llvm::Optional<swift::ProtocolConformanceRef> (swift::CanType, swift::Type, swift::ProtocolType*)>::callback_fn<swift::MakeAbstractConformanceForGenericType>(long, swift::CanType, swift::Type, swift::ProtocolType*) (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x5794e9)
12:57:55 #​9 0x000000000159c744 getMemberForBaseType(llvm::function_ref<llvm::Optional<swift::ProtocolConformanceRef> (swift::CanType, swift::Type, swift::ProtocolType*)>, swift::Type, swift::Type, swift::AssociatedTypeDecl*, swift::Identifier, swift::SubstOptions) (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x159c744)
12:57:55 #​10 0x00000000015a0f2d llvm::Optional<swift::Type> llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>::callback_fn<substType(swift::Type, llvm::function_ref<swift::Type (swift::SubstitutableType*)>, llvm::function_ref<llvm::Optional<swift::ProtocolConformanceRef> (swift::CanType, swift::Type, swift::ProtocolType*)>, swift::SubstOptions)::$_17>(long, swift::TypeBase*) (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x15a0f2d)
12:57:55 #​11 0x000000000159d699 swift::Type::transformRec(llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>) const (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x159d699)
12:57:55 #​12 0x000000000159d633 swift::Type::transformRec(llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>) const (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x159d633)
12:57:55 #​13 0x000000000159e25f swift::Type::transformRec(llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>) const (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x159e25f)
12:57:55 #​14 0x000000000159dc0a swift::Type::transformRec(llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>) const (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x159dc0a)
12:57:55 #​15 0x000000000159d633 swift::Type::transformRec(llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>) const (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x159d633)
12:57:55 #​16 0x000000000159dc0a swift::Type::transformRec(llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>) const (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x159dc0a)
12:57:55 #​17 0x000000000159dc3d swift::Type::transformRec(llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>) const (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x159dc3d)
12:57:55 #​18 0x000000000159ca2a swift::Type::substDependentTypesWithErrorTypes() const (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x159ca2a)
12:57:55 #​19 0x000000000153462c swift::GenericEnvironment::mapTypeIntoContext(swift::GenericEnvironment*, swift::Type) (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x153462c)
12:57:55 #​20 0x0000000001395a1b swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*) (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x1395a1b)
12:57:55 #​21 0x0000000001394516 swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*) (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x1394516)
12:57:55 #​22 0x000000000139287d swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x139287d)
12:57:55 #​23 0x00000000013926ed swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x13926ed)
12:57:55 #​24 0x000000000139343d swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x139343d)
12:57:55 #​25 0x00000000013b0928 typeCheckFunctionsAndExternalDecls(swift::TypeChecker&) (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x13b0928)
12:57:55 #​26 0x00000000013b1808 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x13b1808)
12:57:55 #​27 0x0000000000f84c86 swift::CompilerInstance::performSema() (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0xf84c86)
12:57:55 #​28 0x00000000004aa8e0 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x4aa8e0)
12:57:55 #​29 0x00000000004a8f0b swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x4a8f0b)
12:57:55 #​30 0x0000000000465527 main (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x465527)
12:57:55 #​31 0x00007f60779a1830 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20830)
12:57:55 #​32 0x0000000000462bc9 _start (/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift+0x462bc9)
12:57:55 Stack dump:
12:57:55 0. Program arguments: /home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/swift-linux-x86_64/bin/swift -frontend -target x86_64-unknown-linux-gnu -module-cache-path /tmp/swift-testsuite-clang-module-cacheeo9JhH -swift-version 3 /home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/swift/validation-test/compiler_crashers_fixed/28666-conformingreplacementtype-is-substitutabletype-conformingreplacementtype-is-depe.swift -emit-ir
12:57:55 1. While type-checking getter for f at /home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/swift/validation-test/compiler_crashers_fixed/28666-conformingreplacementtype-is-substitutabletype-conformingreplacementtype-is-depe.swift:9:41
12:57:55 Error: Aborted (core dumped)
12:57:55
12:57:55 --
12:57:55
12:57:55 ********************
Other hashes
clang d0859fbda2 Merge remote-tracking branch 'origin/swift-4.0-branch' into stable
cmark d875488 Merge pull request #​4 from llvm-beanz/generate-cmark-exports
compiler-rt 07e665324 Merge remote-tracking branch 'origin/swift-4.0-branch' into stable
llbuild b1f8505 Merge pull request #​161 from ddunbar/denormalize-rule-result
lldb 0f6fbee61 Merge remote-tracking branch 'origin/swift-4.0-branch' into stable
llvm 0626c1d73b4 Merge remote-tracking branch 'origin/swift-4.0-branch' into stable
ninja 256bf89 forgot to bump version in manual for 1.7.2 release
swift 883fda88070 [stdlib] A Character's buffer should only contain 1 grapheme
swift-corelibs-foundation d6e5c2d4 Merge pull request #​980 from rintaro/newtype-comparable
swift-corelibs-libdispatch 3fba60a Merge pull request #​246 from compnerd/build-dependencies
swift-corelibs-xctest 2e0aedc Merge pull request #​189 from tkremenek/force-tests-swift-ver-3
swift-integration-tests 641971a Merge pull request #​21 from apple/revert-20-revert-19-revert-6a20dc2
swift-xcode-playground-support 05737c4 Merge pull request #​14 from tkremenek/update-swift-4
swiftpm 1acb3c06 Merge pull request #​1184 from apple/revert-1181-SR-3583
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of software