diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-06-26 11:32:01 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-06-26 11:32:01 +0200 |
commit | 5ba129070f46da9b981d36afe2f9f0aac50c3800 (patch) | |
tree | e7fa9391e2a3a14805800e8b91e1efcb57a71548 /test/files/neg/t8675b.scala | |
parent | 7a16f76673530f71bf1b8fa79b489b502ef504a8 (diff) | |
download | scala-5ba129070f46da9b981d36afe2f9f0aac50c3800.tar.gz scala-5ba129070f46da9b981d36afe2f9f0aac50c3800.tar.bz2 scala-5ba129070f46da9b981d36afe2f9f0aac50c3800.zip |
SI-8675 Add another test case for swallowed type errors
As reported on scala-internals. After tightening up the treatment
of undetermined type parameters in SI-7944, the enclosed test
case no longer typechecks. And since the regression fixed in the
previous commit, the error was swallowed by the typechecker only
to be burped up by a crash in the backend.
Diffstat (limited to 'test/files/neg/t8675b.scala')
-rw-r--r-- | test/files/neg/t8675b.scala | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/files/neg/t8675b.scala b/test/files/neg/t8675b.scala new file mode 100644 index 0000000000..2c5015b1d0 --- /dev/null +++ b/test/files/neg/t8675b.scala @@ -0,0 +1,22 @@ +object Test { + trait Engine1 + + implicit class EngineTools1[Params, R](e: Engine1) { + def asRequirement: Requirement1[Params, R] = ??? + } + trait Requirement1[Params, R] { + def pathsIncludingSelf: Traversable[List[Reportable1[Params, R]]] + } + trait Reportable1[Params, R] + + // "missing paramater type" error was swallowed in 2.11.0 leading to a crash + // in the backend. + // + // This error is itself a regression (or at least a change) in 2.11.0-M7, + // specifically in SI-7944. The type paramaters to the implicit view + // `EngineTools1` are undetermined, and are now treated as type variables + // in the expected type of the closure argument to `withFilter`. + for (path: List[Any] <- (null : Engine1).asRequirement.pathsIncludingSelf.toList) { + ??? + } +} |