Commit Graph

14 Commits

Author SHA1 Message Date
Henrik G. Olsson
cbc0ec3b88 Add -verify-ignore-unrelated where necessary (NFC)
These are tests that fail in the next commit without this flag. This
does not add -verify-ignore-unrelated to all tests with -verify, only
the ones that would fail without it. This is NFC since this flag is
currently a no-op.
2025-10-04 14:19:52 -07:00
Hamish Knight
17837eaade [test] Remove unnecessary -c
This crashes the new driver (https://github.com/swiftlang/swift-driver/issues/1570).
2024-09-22 21:15:45 +01:00
Visckmart
e18bfaba52 [Parser] Improve diagnostics for access-level modifiers
Improve the diagnostics for situations where multiple access-level modifiers are used on the same declaration. Keep the original duplicate error message if the access levels are the same.
2023-10-26 19:02:35 -03:00
Anthony Latsis
14b70f306b DiagnosticVerifier: Default expected fix-it start line to the diagnostic's 2023-03-08 12:10:27 +03:00
Minhyuk Kim
0b4856939a Modify diagnostics on open extensions 2021-09-08 18:31:03 +09:00
Varun Gandhi
a1716fe2a6 [Diagnostics] Update compiler diagnostics to use less jargon. (#31315)
Fixes rdar://problem/62375243.
2020-04-28 14:11:39 -07:00
fischertony
762eec38f3 [Sema] Always allow public overrides of open methods 2019-02-27 06:31:43 +03:00
Jordan Rose
6290d9be60 Introduce DescriptiveDeclKind::Property (#18183)
...and collapse StaticVar/ClassVar and StaticLet/ClassLet into
StaticProperty/ClassProperty.

"var" and "let" aren't great nouns to use in diagnostics to begin with,
especially alongside semantic terms like "instance method". Focus on
the type vs. non-type aspect instead with "property", which better
matches how people talk about member vars (and lets) anyway.
2018-07-30 09:23:59 -07:00
Jordan Rose
6a080d8c5c Disallow 'open let'
...and add a verifier check to make sure we don't mix 'open' and
'final' in the future.

You could /write/ 'open let' in Swift 4.1, but you couldn't actually
override such a property (within the module or outside). To maintain
source compatibility, this is just going to emit a warning before
Swift 5 (instead of an error), since it wasn't harming anything in
practice.
2018-04-18 16:48:10 -07:00
Dmitri Gribenko
486cab447d tests: replace 'rm -rf %t && mkdir -p %t' with '%empty-directory(%t)'
These changes were made using a script.
2017-06-04 11:08:39 -07:00
David Farler
b7d17b25ba Rename -parse flag to -typecheck
A parse-only option is needed for parse performance tracking and the
current option also includes semantic analysis.
2016-11-28 10:50:55 -08:00
Dmitri Gribenko
55864d10cb Tests: use 'mkdir -p' 2016-09-02 21:36:45 -07:00
Jordan Rose
8b1ce7d1e7 Switch override checking over to access scopes. (#4508)
The class version of f65ad810d. Fixes some incorrect diagnostics.

We really do need https://bugs.swift.org/browse/SR-2209 to make
this all cleaner.

rdar://problem/27820665
2016-08-26 09:07:20 -07:00
John McCall
afdda3d107 Implement SE-0117.
One minor revision: this lifts the proposed restriction against
overriding a non-open method with an open one.  On reflection,
that was inconsistent with the existing rule permitting non-public
methods to be overridden with public ones.  The restriction on
subclassing a non-open class with an open class remains, and is
in fact consistent with the existing access rule.
2016-08-02 07:46:38 -07:00