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-14915] Assertion failed: (!isa<ConstructorDecl>(decl)) for class with "init() async" when -enable-testing provided #57262

Open
swift-ci opened this issue Jul 13, 2021 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-14915
Radar rdar://problem/80526219
Original Reporter kit-transue (JIRA User)
Type Bug

Attachment: Download

Environment

Swift 5.5 DEVELOPMENT-SNAPSHOT-2021-07-08-a toolchain

macOS 11.4

Xcode 12.5.1

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 918e2de26136e1625b2ce86265799e9f

Issue Description:

Using Swift 5.5 DEVELOPMENT-SNAPSHOT-2021-07-08-a and a class with a trivial initializer marked async, swift fails with an assertion when -enable-testing is passed to the compiler:

Assertion failed: (!isa<ConstructorDecl>(decl)), function appendEntity, file /Users/buildnode/jenkins/workspace/oss-swift-5.5-package-macos/swift/lib/AST/ASTMangler.cpp, line 3004.

A seemingly-valid .o file is generated if the "-enable-testing" is removed from the compiler invocation.

@typesanitizer
Copy link

@swift-ci create

@swift-ci
Copy link
Collaborator Author

Comment by Kit Transue (JIRA)

Discovered while attempting to reproduce with the 2021-07-17 toolchain:

The crash in 2021-07-08 is also squelched by '-validate-tbd-against-ir=none'.

(Note that with the newer swift-5.5-DEVELOPMENT-SNAPSHOT-2021-07-17-a toolchain, this option is newly-needed to get past widespread 'is in generated IR file, but not in TBD file' errors. Because of the -validate-tbd-against-ir=none workaround, this toolchain is unsuitable for reproducing this error.)

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
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
Projects
None yet
Development

No branches or pull requests

2 participants