Files
swift-mirror/test/Serialization/attr-frozen.swift
Nate Chandler 2eea24cd35 [TypeCheckAttr] Frozen is valid without resilience
Even when building not for library evolution, @frozen is a valid
attribute on enums.

rdar://128358780
2024-05-20 17:22:47 -07:00

15 lines
656 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module -o %t/attr.swiftmodule %s -verify -warnings-as-errors
// RUN: llvm-bcanalyzer -dump %t/attr.swiftmodule | %FileCheck -check-prefix=CHECK-NON-RESILIENT %s
// RUN: %target-swift-frontend -emit-module -o %t/attr_resilient.swiftmodule -enable-library-evolution -warnings-as-errors %s
// RUN: llvm-bcanalyzer -dump %t/attr_resilient.swiftmodule | %FileCheck -check-prefix=CHECK-RESILIENT %s
// These two should be checking for the same thing.
// CHECK-RESILIENT: Frozen_DECL_ATTR
// CHECK-NON-RESILIENT: Frozen_DECL_ATTR
@frozen // expected-no-warning
public enum SomeEnum {
case x
}