mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
28 lines
746 B
Swift
28 lines
746 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-emit-module-interface(%t/ReflectionMetadata.swiftinterface) %s -module-name CRM -enable-experimental-feature RuntimeDiscoverableAttrs
|
|
// RUN: %target-swift-typecheck-module-from-interface(%t/ReflectionMetadata.swiftinterface) -module-name CRM
|
|
// RUN: %FileCheck %s < %t/ReflectionMetadata.swiftinterface
|
|
|
|
// REQUIRES: asserts
|
|
|
|
@runtimeMetadata
|
|
public struct Flag {
|
|
public init<T>(attachedTo: T) {}
|
|
}
|
|
|
|
@Flag
|
|
public class BaseClass {}
|
|
|
|
// CHECK: public class TestClass : CRM.BaseClass
|
|
|
|
public class TestClass : BaseClass {}
|
|
|
|
// CHECK: @available(*, unavailable)
|
|
// CHECK-NEXT: @CRM.Flag extension CRM.TestClass {
|
|
// CHECK-NEXT: }
|
|
|
|
@available(*, unavailable)
|
|
@Flag
|
|
public extension TestClass {
|
|
}
|