diff options
author | Paul Phillips <paulp@improving.org> | 2010-09-27 19:51:27 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-09-27 19:51:27 +0000 |
commit | a56c33b6a470939a1396015972f09e19dc493245 (patch) | |
tree | 4c38946754440c8860180ccda2b1bb83eb938a3a /test/checker-tests/fail2.scala | |
parent | b40f4ba3221f1091f4821423f18c157907e9a3c7 (diff) | |
download | scala-a56c33b6a470939a1396015972f09e19dc493245.tar.gz scala-a56c33b6a470939a1396015972f09e19dc493245.tar.bz2 scala-a56c33b6a470939a1396015972f09e19dc493245.zip |
Bringing the tree and icode checkers back to life.
build/pack/bin/scalac -d /tmp -Ycheck-debug -Ycheck:all \
src/compiler/scala/tools/nsc/Global.scala
That blows up in constructors as most files do, so also try it with
-Ycheck:icode to see the pretty icode output (for a little while anyway,
after which it will again blow up.)
Our work has only just begun! See test/checker-tests/fail*.scala for
11 examples of places where the checker cries foul. Many of them are
telling us about real issues and we should listen, but I will need help
to figure out which are legitimate and which should be eliminated by
altering the checkers.
This patch also hacks on some territory the checkers drew me into,
especially TypeKinds, where I figured anything which had been commented
out since 2005 was fair game.
(Optional) review by dragos. (The one place I know I could use a look is
in Checkers.scala, because I had to relax some checks and add at least
one newer opcode.)
Diffstat (limited to 'test/checker-tests/fail2.scala')
-rw-r--r-- | test/checker-tests/fail2.scala | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/test/checker-tests/fail2.scala b/test/checker-tests/fail2.scala new file mode 100644 index 0000000000..0f0d83aeb2 --- /dev/null +++ b/test/checker-tests/fail2.scala @@ -0,0 +1,50 @@ +// CC#9248 is conspicuously absent from the printed trees at every phase. +class A { + def f[A, CC[X] <: Traversable[X]](): Unit = () +} + +// % work/check all -uniqid -Xprint:typer work/fail2.scala +// +// TypeStack init: REFERENCE(type AnyRef#2783) +// [Not checkable: parser] +// [Not checkable: namer] +// [Not checkable: packageobjects] +// [[syntax trees at end of typer]]// Scala source: fail2.scala +// package <empty>#3 { +// class A#9239 extends java.lang.Object#2488 with ScalaObject#1481 { +// def this#9243(): A#9239 = { +// A#9239.super.this#5850(); +// () +// }; +// def f#9244[A#9245 >: Nothing#5846 <: Any#46, CC#9246[X#11055 >: Nothing#5846 <: Any#46] >: [X#11055]Nothing#5846 <: [X#11055]Traversable#3199[X#11055]](): Unit#3819 = () +// } +// } +// +// [Now checking: typer] +// [check: typer] work/fail2.scala:3: Expected owner type CC#9248, found type CC#9246: Trees$TypeDef / type X#11055>: Nothing#5846 <: Any#46 +// [Now checking: superaccessors] +// [check: superaccessors] work/fail2.scala:3: Expected owner type CC#9248, found type CC#9246: Trees$TypeDef / type X#11055>: Nothing#5846 <: Any#46 +// [Now checking: pickler] +// [check: pickler] work/fail2.scala:3: Expected owner type CC#9248, found type CC#9246: Trees$TypeDef / type X#11055>: Nothing#5846 <: Any#46 +// [Now checking: refchecks] +// [check: refchecks] work/fail2.scala:3: Expected owner type CC#9248, found type CC#9246: Trees$TypeDef / type X#11055>: Nothing#5846 <: Any#46 +// [Now checking: selectiveanf] +// [check: selectiveanf] work/fail2.scala:3: Expected owner type CC#9248, found type CC#9246: Trees$TypeDef / type X#11055>: Nothing#5846 <: Any#46 +// [Now checking: liftcode] +// [check: liftcode] work/fail2.scala:3: Expected owner type CC#9248, found type CC#9246: Trees$TypeDef / type X#11055>: Nothing#5846 <: Any#46 +// [Now checking: selectivecps] +// [check: selectivecps] work/fail2.scala:3: Expected owner type CC#9248, found type CC#9246: Trees$TypeDef / type X#11055>: Nothing#5846 <: Any#46 +// [Now checking: uncurry] +// [check: uncurry] work/fail2.scala:3: Expected owner type CC#9248, found type CC#9246: Trees$TypeDef / type X#11055>: Nothing#5846 <: Any#46 +// [Now checking: tailcalls] +// [check: tailcalls] work/fail2.scala:3: Expected owner type CC#9248, found type CC#9246: Trees$TypeDef / type X#11055>: Nothing#5846 <: Any#46 +// [Not checkable: specialize] +// [Not checkable: explicitouter] +// [Now checking: erasure] +// [Now checking: lazyvals] +// [Now checking: lambdalift] +// [Now checking: constructors] +// [Now checking: flatten] +// [Now checking: mixin] +// [Now checking: cleanup] +// ...
\ No newline at end of file |