Commit Graph

9 Commits

Author SHA1 Message Date
David Zarzycki
31d8153097 [Sema] QoI: Report all tuple type resolution errors
This improves single pass diagnostics when more than one tuple type
element has problems.
2019-03-11 16:03:17 -04: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
Slava Pestov
90d6e8dce8 Sema: Variadic parameters are always @escaping and cannot be @autoclosure
A variadic parameter of function type must be @escaping -- we cannot
reason about an array of non-escaping closures, so this was a safety
hole.

Also, attempting to define an @autoclosure variadic did not produce a
diagnostic, but would fail later on if you actually tried to do
anything with it. Let's ban this completely.

Both changes are source breaking, but impact is limited to code that
was already only marginally valid.
2016-09-15 21:46:02 -07:00
Manav Gabhawala
7862f104c9 [Parser] Cleans up parsing of parameter attributes. Implements SE-0053. Fixes SR-979, SR-1020 and cleans up implementation of SE-0003. Provides better fix-its and diagnostics for misplaced 'inout' and prohibits 'var' and 'let' from parameter attributes 2016-03-29 13:55:46 -04:00
Daniel Duan
fb66ec8ea4 [Parser] add test for 'inout' deprecation warning 2016-02-26 01:33:23 -08:00
Daniel Duan
780b58a9a5 [Parser] update tests for 'inout' syntax adjustment 2016-02-26 01:33:22 -08:00
Chris Lattner
3218595c19 Fix:
<rdar://problem/21560309> inout allowed on function return type
<rdar://problem/21949448> Accepts-invalid: 'inout' shouldn't be allowed on stored properties

at first blush, they looked like the same issue, but they weren't:
 - The former was incorrectly propagation of the TR_FunctionInput bits in TypeResolver
 - The later was the inout was being parsed and ignored on some types (!)

Also, slap ErrorType on invalid inout TypeReprs to silence downstream errors.



Swift SVN r30756
2015-07-29 04:58:49 +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
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