diff options
author | Paolo G. Giarrusso <p.giarrusso@gmail.com> | 2013-01-20 17:55:57 +0100 |
---|---|---|
committer | Paolo G. Giarrusso <p.giarrusso@gmail.com> | 2013-03-15 01:32:47 +0100 |
commit | ec6548fb91309b72bd46ff939f79bb253ca5953a (patch) | |
tree | d1beba1b6dd0e1f260ff6a86dfd5e16635d76723 /build.number | |
parent | 482bef8079e2a2fecc2b8f77eb7c6da648125e3c (diff) | |
download | scala-ec6548fb91309b72bd46ff939f79bb253ca5953a.tar.gz scala-ec6548fb91309b72bd46ff939f79bb253ca5953a.tar.bz2 scala-ec6548fb91309b72bd46ff939f79bb253ca5953a.zip |
SI-6123: -explaintypes should not explain errors which won't be reported
-explainTypes means that only type tests which *fail* should be reported in more
detail by using explainTypes. Hence, callers of explainTypes should check if
type errors are being ignored, by checking context.reportErrors. Hence, this
check is added to Inferencer, and another call site is redirected to that
method.
Moreover, explainTypes should only be called if an error exists. Enforce that in
checkSubType, and remove spurious home-made explainTypes output.
Finally, in ContextErrors, stop checking `settings.explaintypes.value` before
calling `explainTypes` which will check it again.
Note that this patch does not fix all occurrences, but only the ones which
showed up during debugging. The other ones never cause problems, maybe because
they occur when contextErrors is in fact guaranteed to be true. We might want to
fix those ones anyway.
This fixes regressions in c800d1fec5241ed8c29e5af30465856f9b583246 and
78f9ef3906c78413ff8835fdad3849bfe5516be2.
Thanks to hubertp (Hubert Plociniczak) for the first round of review.
Refs #6123
backport to _2.10.x_
Diffstat (limited to 'build.number')
0 files changed, 0 insertions, 0 deletions