Commit Graph

8 Commits

Author SHA1 Message Date
Robert Widmann
911e749e4e [Sema] Suggest #selector(self.foo) instead of #selector(TypeName.foo) when possible
When inside a declaration or extension of TypeName, humans usually don't write
the full typename like #selector(TypeName.foo), but instead prefer the neater
form #selector(self.foo). The compiler has enough information to do this too.

Fixes rdar://problem/2528469
2019-11-11 12:35:03 -08:00
Slava Pestov
a44125eb91 These tests no longer need -swift-version 3 2018-10-31 15:29:18 -04:00
Doug Gregor
6a8d3211aa [Type checker] Move ad-hoc isObjC/isDynamic checking to finalization.
Whenever we visit a declaration via the DeclChecker, add it to the
list of declarations to finalize. This makes sure that we can centralize
the notion of “finalize for SILGen” and that it will be called for
everything in the source file being processed.
2018-07-25 20:55:13 -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
Huon Wilson
787736d6b8 [Sema] Suggest #selector(self.foo) instead of #selector(TypeName.foo) when possible.
When inside a declaration or extension of TypeName, humans usually don't write
the full typename like #selector(TypeName.foo), but instead prefer the neater
form #selector(self.foo). The compiler has enough information to do this too.

Fixes rdar://problem/25284692 .
2017-06-23 14:55:53 -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
Xi Ge
2ebab526bf [FixCode] Apply coercion fixits on return statement and initialization as well. rdar://27891589 rdar://27891426
We saw manual migration is necessary on these cases to add 'as Type'. This patch starts
to issue compiler fixits on return statement and initialization just like in other type-mismatch
cases.
2016-08-18 13:21:44 -07:00
Ben Langmuir
a8534530b2 [FixCode] Move AnyObject bits into an objc-interop test
Keep the main test portable by moving the objc_interop bits into their
own test, combined with the existing selector tests.
2016-08-16 18:56:38 -07:00