We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c22258d commit 9d1ab28Copy full SHA for 9d1ab28
test/NameBinding/name_lookup.swift
@@ -516,3 +516,22 @@ class r16954496 {
516
lazy var x: Array<(r16954496) -> () -> Void> = [bar]
517
}
518
519
+
520
521
+// <rdar://problem/27413116> [Swift] Using static constant defined in enum when in switch statement doesnt compile
522
+enum MyEnum {
523
+ case one
524
+ case two
525
526
+ static let kMyConstant = "myConstant"
527
+}
528
529
+switch "someString" {
530
+case MyEnum.kMyConstant: // this causes a compiler error
531
+ print("yay")
532
+case MyEnum.self.kMyConstant: // this works fine
533
+ print("hmm")
534
+default:
535
+ break
536
537
0 commit comments