Commit Graph

6 Commits

Author SHA1 Message Date
Rintaro Ishizaki
8a58107123 [Parse] Diagnose default argument for subscript in protocols
Protocol requirements don't support default arguments. Although this is
a "semantic" diagnostics, we currently do this for 'func' and 'init' in
Parser. So for fixing a crash, let's to it for 'subscript' in Parser
too.

rdar://problem/73159041
2021-01-22 17:21:17 -08: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
Manav Gabhawala
7928140f79 [SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary 2016-04-06 20:21:58 -04: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 Willmore
ac86dc2ab2 Raise an error on declaring a protocol initializer with default args.
rdar://problem/18637242

Swift SVN r22853
2014-10-20 22:40:48 +00:00
Joe Pamer
cbc69bc8ee Restrict use of default arguments on protocol method signatures.
We were never handling this correctly, and default arguments are checked along with the method body.
In some cases where no further validation was necessary (such as when the default argument was a literal value),
the compiler would let this slip through but in others this would cause a crash.  (rdar://problem/16476405)

Swift SVN r15736
2014-04-01 16:53:21 +00:00