mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Macros] Tighten restriction on non-expression macros not having return types
There is no reason to special-case `Void` to permit it. Rather, make this a syntactic rule. Thanks to Alex Hoppen for the suggestion.
This commit is contained in:
@@ -51,7 +51,7 @@ macro am1()
|
||||
named, // expected-error{{introduced name kind 'named' requires a single argument '(name)'}}
|
||||
arbitrary(a) // expected-error{{introduced name kind 'arbitrary' must not have an argument}}
|
||||
)
|
||||
macro am2() -> Void
|
||||
macro am2()
|
||||
// expected-error@-1{{macro 'am2()' requires a definition}}
|
||||
|
||||
#m1 + 1
|
||||
|
||||
Reference in New Issue
Block a user