Files
swift-mirror/test/Compatibility/attr_inlinable_old_spelling_42.swift
Robert Widmann b68775c59b Shop the Wording of @usableFromInline Redundancy Diagnostic
- Explicitly call out the decl kind
- Clearly state the exact issue at hand
- Correct the tests to check for the fixit

rdar://88527799
2022-02-08 16:16:30 -08:00

13 lines
607 B
Swift

// RUN: %target-typecheck-verify-swift -swift-version 4.2
// In -swift-version 4.2 mode, the old spelling produces a warning.
@_inlineable public func oldInlinableFunction() {}
// expected-warning@-1 {{'@_inlineable' has been renamed to '@inlinable'}}{{2-13=inlinable}}
@_versioned func oldVersionedFunction() {}
// expected-warning@-1 {{'@_versioned' has been renamed to '@usableFromInline'}}{{2-12=usableFromInline}}
@inlinable @usableFromInline func redundantAttribute() {}
// expected-warning@-1 {{'@usableFromInline' attribute has no effect on '@inlinable' global function 'redundantAttribute()'}}