- 
                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 softwaretype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis
Description
| Previous ID | SR-12998 | 
| Radar | None | 
| Original Reporter | 0-1 (JIRA User) | 
| Type | Bug | 
| Status | Resolved | 
| Resolution | Done | 
Additional Detail from JIRA
| Votes | 0 | 
| Component/s | Compiler | 
| Labels | Bug, CompilerCrash, TypeChecker | 
| Assignee | @theblixguy | 
| Priority | Medium | 
md5: da1a27a777b6be474b5c910416171f6d
relates to:
- SR-13022 Support magic literals as enum case raw value
 
Issue Description:
Bug with #file
enum Foo: String {
{{ case bar = #file}}
{{}}}
This causes an internal error: Segmentation Fault: 11
Is #file considered a literal String?
"(5)" is not a literal. But Apple's Swift 5.2 Guide describes #file, #line, #function, #colorLiteral, etc. all as literals.
___
Bug with nil
enum I:Int?{
{{ case a = nil}}
{{}}}
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 softwaretype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis