mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
13 lines
197 B
Swift
13 lines
197 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
enum E {
|
|
case a
|
|
case b(Int)
|
|
|
|
var c: E { .b(42) }
|
|
}
|
|
|
|
func test(_: _const E) {}
|
|
|
|
test(.a.c) // expected-error {{expect a compile-time constant literal}}
|