You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
swift-ci opened this issue
May 1, 2019
· 5 comments
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of softwarekey pathsFeature: key paths (both native and Objective-C)
SR-10128 Compiler crashes when generic type constraint is the associated type of another protocol which the class also conforms to which and has a default implementation
Issue Description:
Not exactly sure what's going on here: mainly that the below code segfaults the compiler.
<stdin>:11:7: error: type 'B<Y>' does not conform to protocol 'Nested'
class B<Y> : Nested {
^
<stdin>:2:20: note: protocol requires nested type 'U'; do you want to add it?
associatedtype U
^
but then
Assertion failed: ((conformingReplacementType->is<ErrorType>() || conformingReplacementType->is<SubstitutableType>() || conformingReplacementType->is<DependentMemberType>()) && "replacement requires looking up a concrete conformance"), function operator(), file /Volumes/Data/swift-public/swift/lib/AST/Type.cpp, line 2931.
Stack dump:
0. Program arguments: /Volumes/Data/swift-public/build/ninja/swift-macosx-x86_64/bin/swift -frontend -c -primary-file - -emit-module-path /var/folders/_d/dmrgv26d3bs6lkrks9z825_w0000gn/T/--f5dce8.swiftmodule -emit-module-doc-path /var/folders/_d/dmrgv26d3bs6lkrks9z825_w0000gn/T/--f5dce8.swiftdoc -target x86_64-apple-darwin18.6.0 -enable-objc-interop -sdk /Volumes/Data/Applications/Xcode10.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -g -enable-anonymous-context-mangled-names -color-diagnostics -module-name main -o /var/folders/_d/dmrgv26d3bs6lkrks9z825_w0000gn/T/--f5dce8.o
1. Swift version 5.0-dev (LLVM f0b886e419, Swift b44d3490dc)
2. While type-checking 'cFunc(_:)' (at <stdin>:17:5)
3. While type-checking statement at [<stdin>:17:27 - line:19:5] RangeText="{
let function: (B<Int>, ReferenceWritableKeyPath<M, Int>) -> Void = a.f
"
4. While type-checking declaration 0x7fc1a403ad60 (at <stdin>:18:9)
5. While type-checking expression at [<stdin>:18:76 - line:18:78] RangeText="a."
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of softwarekey pathsFeature: key paths (both native and Objective-C)
Environment
Xcode 10.2
Swift 5
Additional Detail from JIRA
md5: 1c939a5b8c0482025aa3b5f50db147ff
duplicates:
Issue Description:
Not exactly sure what's going on here: mainly that the below code segfaults the compiler.
The text was updated successfully, but these errors were encountered: