Skip to content

[SR-12998] Raw Value of literal String #file breaks enum with String Protocol #55443

Closed
@swift-ci

Description

@swift-ci
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.compilerThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwaretype checkerArea → compiler: Semantic analysis

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions