Commit 67b2128
committed
Lower the "ambiguous display name" diagnostic to a warning for some names.
This PR modifies the behaviour of this compile-time macro diagnostic:
> 🛑 "Attribute 'Test' specifies display name 'foo' for function with implicit
> display name 'bar'
If `bar` (in the above context) is _not_ considered a raw identifier by the
language, we emit a warning instead of an error. This will allow us to adjust
display-name-from-backticked-name inference (see #1174) without introducing a
source-breaking change for a declaration such as:
```swift
@test("subscript([K]) operator")
func `subscript`()
```
(The above is a real-world test function in our own package that would be
impacted.)
Note that we don't actually have a code path that triggers this warning yet.
#1174, if approved and merged, would introduce such a code path.1 parent a208154 commit 67b2128
File tree
2 files changed
+11
-4
lines changed- Sources/TestingMacros/Support
2 files changed
+11
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
147 | 149 | | |
148 | | - | |
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
657 | 657 | | |
658 | 658 | | |
659 | 659 | | |
660 | | - | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
661 | 667 | | |
662 | | - | |
663 | | - | |
| 668 | + | |
| 669 | + | |
664 | 670 | | |
665 | 671 | | |
666 | 672 | | |
| |||
0 commit comments