Hamish Knight
c667d2b361
Use DefaultArgumentExpr for caller-side defaults
...
This commit changes how we represent caller-side
default arguments within the AST. Instead of
directly inserting them into the call-site, use
a DefaultArgumentExpr to refer to them indirectly.
The main goal of this change is to make it such
that the expression type-checker no longer cares
about the difference between caller-side and
callee-side default arguments. In particular, it
no longer cares about whether a caller-side
default argument is well-formed when type-checking
an apply. This is important because any
conversions introduced by the default argument
shouldn't affect the score of the resulting
solution.
Instead, caller-side defaults are now lazily
type-checked when we want to emit them in SILGen.
This is done through introducing a request, and
adjusting the logic in SILGen to be more lenient
with ErrorExprs. Caller-side defaults in primary
files are still also currently checked as a part
of the declaration by `checkDefaultArguments`.
Resolves SR-11085.
Resolves rdar://problem/56144412.
2019-11-20 15:07:32 -08:00
..
2019-09-17 11:52:43 -07:00
2018-07-03 16:03:07 -07:00
2018-07-03 16:03:07 -07:00
2018-07-03 16:03:07 -07:00
2018-07-03 16:03:07 -07:00
2017-11-14 12:19:09 -08:00
2018-07-04 20:58:21 -07:00
2018-07-03 16:03:07 -07:00
2017-11-14 12:19:09 -08:00
2018-07-03 16:03:07 -07:00
2017-11-14 12:19:09 -08:00
2018-07-03 16:03:07 -07:00
2017-11-14 12:19:09 -08:00
2018-04-16 13:10:34 +02:00
2018-11-30 16:30:15 -05:00
2017-11-09 09:00:43 -08:00
2018-02-08 01:55:39 -08:00
2017-11-14 12:19:09 -08:00
2018-07-05 23:54:13 -07:00
2018-03-30 17:56:36 -04:00
2018-11-30 16:30:15 -05:00
2017-11-18 11:41:53 +09:00
2018-03-30 21:55:30 -07:00
2019-05-30 17:55:37 -07:00
2018-03-13 13:28:58 -07:00
2018-03-13 13:28:58 -07:00
2017-11-14 12:19:09 -08:00
2018-03-30 21:55:30 -07:00
2019-11-20 15:07:32 -08:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2018-07-10 17:01:12 -07:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2018-03-21 23:54:48 -07:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2018-06-14 15:29:57 -07:00
2017-11-14 12:19:09 -08:00
2018-08-28 13:20:25 -07:00
2018-01-24 15:58:26 -08:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2018-04-16 13:10:34 +02:00
2018-07-10 17:01:12 -07:00
2018-07-03 17:26:38 -07:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2018-04-09 16:01:37 -07:00
2018-02-02 08:44:30 +11:00
2017-11-14 12:19:09 -08:00
2017-12-30 23:27:04 -08:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2018-07-10 17:01:12 -07:00
2018-07-10 17:01:12 -07:00
2018-06-14 15:29:57 -07:00
2018-03-25 20:46:07 -07:00
2018-02-02 08:44:30 +11:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2018-03-21 23:49:33 -07:00
2018-07-10 17:01:12 -07:00
2019-06-26 17:49:47 -03:00
2017-10-27 23:41:08 -07:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2017-10-31 15:28:19 -07:00
2018-02-13 00:08:56 -08:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2018-05-28 00:24:54 -07:00
2017-11-14 12:19:09 -08:00
2018-05-28 00:24:54 -07:00
2018-05-02 13:39:21 -07:00
2017-10-27 23:41:08 -07:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2018-07-10 17:01:12 -07:00
2018-03-30 17:56:36 -04:00
2017-11-14 12:19:09 -08:00
2018-07-10 17:01:12 -07:00
2018-06-16 08:41:00 -06:00
2017-11-14 12:19:09 -08:00
2018-05-02 15:11:25 -07:00
2018-07-10 17:01:12 -07:00
2018-07-03 17:26:38 -07:00
2017-11-14 12:19:09 -08:00
2018-06-16 08:41:00 -06:00
2018-05-03 18:11:35 -07:00
2018-06-30 05:19:03 -04:00
2017-11-14 12:19:09 -08:00
2018-07-10 17:01:12 -07:00
2018-07-17 22:54:22 +10:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2018-01-24 15:58:26 -08:00
2018-02-13 00:08:56 -08:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2018-10-06 22:08:45 -07:00
2018-03-21 21:41:38 -07:00
2019-04-30 10:43:23 -07:00
2018-06-16 08:41:00 -06:00
2017-11-14 12:19:09 -08:00
2017-11-14 12:19:09 -08:00
2018-06-14 15:29:57 -07:00
2018-02-08 01:55:39 -08:00
2018-06-16 08:41:00 -06:00
2018-02-13 00:08:56 -08:00
2018-07-03 15:42:31 -07:00
2018-05-03 18:11:35 -07:00