Files
swift-mirror/test/LiteralExpressions/EnumRawValueInterface.swift
Becca Royal-Gordon 1f008fb0d0 [ModuleInterface] Enable module selectors by default
And update tests to use them.

This commit depends on fixes in swiftlang/swift PRs #86905, #87129, and #87130.

Fixes rdar://169749886.
2026-02-20 00:35:23 -08:00

20 lines
799 B
Swift

// Enum case raw value expressions
// REQUIRES: swift_feature_LiteralExpressions
// RUN: %target-swift-frontend -emit-module -module-name EnumRawValueInterface -emit-module-interface-path %t/EnumRawValueInterface.swiftinterface -enable-library-evolution -swift-version 5 %s -enable-experimental-feature LiteralExpressions
// RUN: %FileCheck %s < %t/EnumRawValueInterface.swiftinterface
// CHECK-LABEL: public enum E1 : Swift::Int {
public enum E1: Int {
// CHECK-NEXT: case a
// CHECK-NEXT: case b
// CHECK-NEXT: case c
case a = 2 + 2
case b
case c
// CHECK-DAG: public typealias RawValue = Swift::Int
// CHECK-DAG: public init?(rawValue: Swift::Int)
// CHECK-DAG: public var rawValue: Swift::Int {
// CHECK-DAG: get{{$}}
// CHECK-DAG: }
} // CHECK: {{^}$}}