mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The `-serialize-diagnostics-path` option implies `-serialize-diagnostics`; there's no point in specifying both. Remove the extra flags from the tests.
33 lines
574 B
Swift
33 lines
574 B
Swift
// RUN: %sourcekitd-test -req=index %s -- -serialize-diagnostics-path %t.dia %s | %sed_clean > %t.response
|
|
// RUN: diff -u %s.response %t.response
|
|
|
|
public enum E {
|
|
|
|
case one, two(a: String), three
|
|
|
|
var text: String {
|
|
switch self {
|
|
case .one:
|
|
return "one"
|
|
case .two(let a):
|
|
return a
|
|
case .three:
|
|
return "three"
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
let e: E = .two(a:"String")
|
|
|
|
func brokenEnums() {
|
|
switch NonExistent.A {
|
|
case .A:
|
|
return "one"
|
|
}
|
|
switch E.one {
|
|
case .tenthousand:
|
|
return "one"
|
|
}
|
|
}
|