Files
swift-mirror/test/attr/export.swift
Doug Gregor 020b69d4b6 [SE-0497] Implement @export attribute syntax
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.
2025-11-07 22:00:40 -08:00

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() { }