Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-10023] Assertion failed: !genericSig->areAllParamsConcrete() #52426

Closed
SusanDoggie opened this issue Mar 1, 2019 · 6 comments
Closed

[SR-10023] Assertion failed: !genericSig->areAllParamsConcrete() #52426

SusanDoggie opened this issue Mar 1, 2019 · 6 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software

Comments

@SusanDoggie
Copy link
Contributor

Previous ID SR-10023
Radar None
Original Reporter @SusanDoggie
Type Bug
Status Resolved
Resolution Done
Environment

Xcode 10.2 beta 3
SwiftPM: swift-5.0-DEVELOPMENT-SNAPSHOT-2019-02-26-a

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash
Assignee @slavapestov
Priority Medium

md5: efc219868052b78188dba6d72cccd412

Issue Description:

https://travis-ci.org/SusanDoggie/Doggie/jobs/499764686

xcodebuild is successful. The bug only found in SwiftPM.

Assertion failed: (!genericSig->areAllParamsConcrete() && "If all generic parameters are concrete, SILFunctionType should " "not have a generic signature at all"), function SILFunctionType, file /Users/buildnode/jenkins/workspace/oss-swift-5.0-package-osx/swift/lib/AST/ASTContext.cpp, line 4066.

@SusanDoggie
Copy link
Contributor Author

@belkadan
Copy link
Contributor

belkadan commented Mar 1, 2019

To make sure we don't lose it:

SusanDoggie/Doggie@4c8dea6 for the original bug.

SusanDoggie/Doggie@9d476d3 for the comment.

@jckarter, @slavapestov, does that error message look familiar?

@slavapestov
Copy link
Member

This assert (and the somewhat shaky invariant it enforces) is my doing. I'll take a look.

@slavapestov
Copy link
Member

struct S<T> {}
struct C {}

extension S where T == C {
enum E {
 case number(Double)

 static prefix func -(x: E) -> E {
   return .number(0)
 }
}
}

@slavapestov
Copy link
Member

Reduction for the second bug:

protocol P1 {
    associatedtype A2 : P2 where A2.A1 == Self
}

protocol P2 {
    associatedtype A1 : P1 where A1.A2 == Self
    var property: Int { get }
}

extension P2 {
    var property: Int { return 0 }
}

class C1 : P1 {
    class A2 : P2 {
        typealias A1 = C1
    }
}

Since this is an unrelated issue, I've opened https://bugs.swift.org/browse/SR-10033 to track progress on fixing it; let's use this bug to track the original enum case constructor issue.

Thank you @SusanDoggie for the bug reports!

@slavapestov
Copy link
Member

#23037

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software
Projects
None yet
Development

No branches or pull requests

4 participants