mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
* Parse `#<identifier>` attribute list as a `MacroExpansionDecl` regardless of the position * Diagnose whitespaces between `#` and the macro name. * Correctly attach attributes to `MacroExpansionDecl` * Fix `OrigDeclAttributes` to handle modifiers (use `getLocation()` instead of `AtLoc`.) Type checking is a TODO rdar://107386648
8 lines
315 B
Swift
8 lines
315 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
let _ = #notAPound // expected-error {{no macro named 'notAPound'}}
|
|
let _ = #notAPound(1, 2) // expected-error {{no macro named 'notAPound'}}
|
|
let _ = #Color // expected-error {{no macro named 'Color'}}
|
|
|
|
let _ = [##] // expected-error {{expected a macro identifier}} {{none}}
|