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-5503] Compiler crash with nested function with default argument #48075

swift-ci opened this issue Jul 19, 2017 · 2 comments

[SR-5503] Compiler crash with nested function with default argument #48075

swift-ci opened this issue Jul 19, 2017 · 2 comments


Copy link

@swift-ci swift-ci commented Jul 19, 2017

Previous ID SR-5503
Radar None
Original Reporter (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

$ swiftc --version
Apple Swift version 3.1 (swiftlang-802.0.53 clang-802.0.42)
Target: x86_64-apple-macosx10.9
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 3bb408fc1b179d1d91e75ccd8e413fbe


  • SR-2189 Nested function with local default value crashes

Issue Description:

Following code :

import Foundation

func topLevel()
    let red  = "red",
        blue = "blue"
    func nested(tint: String = red)

makes compiler crash :

$ swiftc Repro.swift 
Global is external, but doesn't have external or weak linkage!
i8* ()* @_TFF5Repro8topLevelFT_T_auL_3redSS
LLVM ERROR: Broken module found, compilation aborted!
Copy link
Collaborator Author

@swift-ci swift-ci commented Jul 19, 2017

Comment by Mike (JIRA)

not 100% sure it is the same thing because of the different error message...

Copy link

@belkadan belkadan commented Jul 19, 2017

Yeah, it's the same. Yours is from a compiler with assertions turned off.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants