Closed scabug closed 8 years ago
Imported From: https://issues.scala-lang.org/browse/SI-9235?orig=1 Reporter: Carl Chatfiled (carlchatfield) Affected Versions: 2.11.5 See #9781 Duplicates #8763
@adriaanm said: Running under -Xprint:typer points towards https://github.com/scala/scala/blob/2.11.x/src/compiler/scala/tools/nsc/typechecker/Typers.scala#L4617
It looks like the error in the RHS of the val (qualqual
) is masked by evalOnce's wrapping?
<synthetic> val ev$1: A = Test.this.as.apply(<undefined: error>);
ev$1.a_=(ev$1.a.+(1))
@adriaanm said: When running under -Ytyper-debug, this looks dubious -- an application to an error-typed arg should be error-typed:
| | | |-- as(<undefined: error>).a EXPRmode-POLYmode-QUALmode (site: method test in Test)
| | | | |-- String => A EXPRmode-POLYmode-QUALmode (site: method test in Test)
| | | | | |-- as.apply BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method test in Test)
| | | | | | \-> (v1: String)A
| | | | | \-> A
| | | | \-> Int
@liff said:
I think this is duplicate with #9781. The example results in error: not found: value undefined
instead of compiler crash on 2.12.x.
@som-snytt said (edited on Nov 1, 2016 6:23:13 AM UTC): I didn't notice these issues until just now. By coincidence I just closed another duplicate because there's a PR on 2.11, https://github.com/scala/scala/pull/5454
Did I already know that? (Yes.) It's all ancient history now. It was before the rains returned.
Crashes the type checker with