Commit Graph

16 Commits

Author SHA1 Message Date
Anthony Latsis
2753fc5715 Diags: Use the declared type for diagnosing inheritance from final class 2020-05-02 16:27:36 +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
Slava Pestov
3701f745c4 Migrate various Sema tests to Swift 4 2018-06-25 01:02:20 -07:00
Slava Pestov
5d2752f7d2 Run tests with -swift-version 4 by default
Some test now fail, so add an explicit -swift-version 3.
2018-06-19 23:24:19 -07:00
Brian King
0770037f6b Only generate a warning for Swift 3 and 4 mode. 2017-03-11 20:34:55 -05:00
Brian King
29c1fc472b Generate an error message on protocol extensions with the final attribute. 2017-03-09 14:18:39 -05:00
Rintaro Ishizaki
3d6da635d3 [TypeChecker] Early diagnose and remove 'final' in non-class context (#7179)
This prevents error dignostics at '<unknown>:0' caused by sythesized
accessors.
2017-02-07 12:30:06 +09: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
Chris Lattner
fc64acb4ae Add fixit checks to various test/attr tests.
Swift SVN r31002
2015-08-04 20:29:00 +00:00
Dmitri Hrybenko
3b04d1b013 tests: reorganize tests so that they actually use the target platform
Most tests were using %swift or similar substitutions, which did not
include the target triple and SDK.  The driver was defaulting to the
host OS.  Thus, we could not run the tests when the standard library was
not built for OS X.

Swift SVN r24504
2015-01-19 06:52:49 +00:00
Argyrios Kyrtzidis
628567bfe5 [Frontend] Make it erroneous if no frontend action is specified when invoking the frontend, and update tests.
Swift SVN r21584
2014-08-29 19:17:37 +00:00
Doug Gregor
5fc8ac7fd1 Require the 'override' keyword for initializers that override designated initializers.
Swift SVN r20490
2014-07-24 15:38:33 +00:00
Chris Lattner
6f3fe21d01 improve a diagnostic to talk about the "override modifier" instead of "override attribute"
Swift SVN r20005
2014-07-16 04:48:20 +00:00
Chris Lattner
ea8b7a471a Extend the attributes machinery to enforce the "OnFoo" flags in Attr.def at sema time, and extend
them to cover all declaration types.

This ensures that we reject attributes on declkinds where they don't make sense.  I went so far
as to make the QoI decent when an attribute can only be applied to a single kind of declaration
to make sure the error message says "@IBAction is only valid on 'func' declarations" as well.

This resolves <rdar://problem/17681151> 'dynamic' accepted by the compiler where it shouldn't be




Swift SVN r19982
2014-07-15 20:30:21 +00:00
Chris Lattner
5b49d59c57 Remove the @ from @final and @lazy, the last major piece of
rdar://17168115.

Also, reinstate the ARM driver change and testcase that I removed
in my last patch.


Swift SVN r19790
2014-07-10 06:23:27 +00:00
Chris Lattner
2eb92598a7 move test/basic/attr to test/attr, and move the sole name binding test in test/basic/lookup to the test/NameBinding
directory.  We now have no basic tests, just advanced ones :-)



Swift SVN r17941
2014-05-12 16:48:41 +00:00