summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2019-03-27 13:11:31 -0700
committerGitHub <noreply@github.com>2019-03-27 13:11:31 -0700
commitc21bffecd9da150576f62ecf8a73a1660717abe9 (patch)
tree22896c7edf26cf9b86c1630e057e33324c049d1b /tools
parentc9930ea56ce0d3d9783d4d2482edb91cb765109e (diff)
Fix spurious error when having too few arguments to a call (#930)
Fixes #782 There is logic in the compiler to confirm that the argument expression for an `out` or `inout` parameter is an l-value. That logic was producing an internal compiler error if it ran out of arguments while processing the parameter list, on the assumption that this would mean an `out` parameter had a default argument expression (which isn't something we want to support). The problem was that the checking for call expressions will diagnose a call with too few arguments, and then leave the call in the AST to support subequent checking. This meant that any call where the user didn't supply enough arguments *and* one of the trailing argument is `out` or `inout` would produce the error for the original problem (not enough arguments), but then *also* produce the internal error because there is seemingly no argument to match with the `out` or `inout` parameter. The right fix is to not take responsibility for diagnosing this problem at the call site, and instead to rule out default value expressions for `out` and `inout` parameters at the declaration site instead.
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions