Details
-
Type:
Improvement
-
Status: Closed
-
Priority:
Medium
-
Resolution: Done
-
Component/s: Compiler
-
Labels:
-
Radar URL:
Description
This code should be accepted, but it is rejected now:
switch 10 { case 10: break #if FOO case 20: break #endif }
$ swiftc /tmp/a.swift /tmp/a.swift:5:3: error: 'case' label can only appear inside a 'switch' statement case 20: ^
Attachments
Issue Links
- relates to
-
SR-4196 Allow #if (conditional compilation) to guard switch cases
-
- Resolved
-