Skip to content

Commit 4668a0c

Browse files
committed
update test/Macros/macro_attribute_expansiondecl.swift
1 parent c5256ff commit 4668a0c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

test/Macros/macro_attribute_expansiondecl.swift

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,19 @@ struct S1 {
160160

161161
// FIXME: Diagnostics could be better.
162162
struct S2 { // expected-note 4 {{add '@available' attribute to enclosing struct}}
163-
// expected-note@+3 6 {{in expansion of macro 'funcFromClosureMacro' here}}
164163
// expected-error@+2 {{'APIFrom99()' is only available in macOS 99 or newer}}
165-
// expected-error@+2 {{'APIFrom99()' is only available in macOS 99 or newer}} expected-note@+2 {{add 'if #available' version check}}
164+
// expected-error@+12 {{'APIFrom99()' is only available in macOS 99 or newer}} expected-note@+12 {{add 'if #available' version check}}
166165
#funcFromClosureMacro(APIFrom99()) {
166+
/*
167+
expected-note@-2 6 {{in expansion of macro 'funcFromClosureMacro' here}}
168+
expected-expansion@-3:3{{
169+
expected-note@1:6 2{{add '@available' attribute to enclosing instance method}}
170+
expected-error@2:9{{'APIFrom99()' is only available in macOS 99 or newer}}
171+
expected-note@2:9{{add 'if #available' version check}}
172+
expected-error@14:11{{'APIFrom99()' is only available in macOS 99 or newer}}
173+
expected-note@14:11{{add 'if #available' version check}}
174+
}}
175+
*/
167176
_ = APIFrom99()
168177
if #available(macOS 999, *) {
169178
_ = APIFrom99()

0 commit comments

Comments
 (0)