mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
In addition to the predefined cases, like "readnone", "readonly", etc. support providing a custom string, which will be parsed later. Also, allow multiple effects attributes to be put onto a function.
20 lines
783 B
Swift
20 lines
783 B
Swift
// RUN: %target-swift-frontend -typecheck -emit-module-interface-path %t.swiftinterface -enable-library-evolution %s
|
|
// RUN: %FileCheck %s < %t.swiftinterface
|
|
|
|
// CHECK: @_transparent public func glass() -> Swift.Int { return 0 }{{$}}
|
|
@_transparent public func glass() -> Int { return 0 }
|
|
|
|
// CHECK: @_effects(readnone) public func illiterate(){{$}}
|
|
@_effects(readnone) public func illiterate() {}
|
|
|
|
// CHECK: @_effects(notEscaping arg1.**) public func escapeEffects(arg1: Swift.Int){{$}}
|
|
@_effects(notEscaping arg1.**) public func escapeEffects(arg1: Int) {}
|
|
|
|
// CHECK-LABEL: @frozen public struct Point {
|
|
@frozen public struct Point {
|
|
// CHECK-NEXT: public var x: Swift.Int
|
|
public var x: Int
|
|
// CHECK-NEXT: public var y: Swift.Int
|
|
public var y: Int
|
|
} // CHECK-NEXT: {{^}$}}
|