mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Implement the @export(implementation) and @export(interface) attributes to replace @_alwaysEmitIntoClient and @_neverEmitIntoClient. Provide a warning + Fix-It to start staging out the very-new @_neverEmitIntoClient. We'll hold off on pushing folks toward @_alwaysEmitIntoClient for a little longer.
25 lines
698 B
Swift
25 lines
698 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
@export(interface)
|
|
func f1() { }
|
|
|
|
@export(implementation)
|
|
func f2() { }
|
|
|
|
@export(nothing) // expected-error{{unknown option 'nothing' for attribute 'export'}}
|
|
func f3() { }
|
|
|
|
@export // expected-error{{expected '(' in 'export' attribute}}
|
|
func f4() { }
|
|
|
|
@export(interface) // expected-error{{'@export(interface)' cannot be used with '@usableFromInline'}}
|
|
@usableFromInline
|
|
func f5() { }
|
|
|
|
@export(interface) // expected-error{{'@export(interface)' cannot be used with '@inlinable'}}
|
|
@inlinable
|
|
func f6() { }
|
|
|
|
@_neverEmitIntoClient // expected-warning{{'@_neverEmitIntoClient' has been renamed to '@export(interface)'}}{{1-22=@export(interface)}}
|
|
func f7() { }
|