diff options
author | Paul Phillips <paulp@improving.org> | 2012-02-13 09:34:03 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-02-13 16:06:36 -0800 |
commit | 92fc4e351300e927ae1a8b0a6c383d00e3968c5d (patch) | |
tree | 3ff2366a45c04ad15013479995e34f3e5e43f7c0 /src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala | |
parent | 6548dcf12d83e327df2f90048140fb95346b7e95 (diff) | |
download | scala-92fc4e351300e927ae1a8b0a6c383d00e3968c5d.tar.gz scala-92fc4e351300e927ae1a8b0a6c383d00e3968c5d.tar.bz2 scala-92fc4e351300e927ae1a8b0a6c383d00e3968c5d.zip |
Existential printing, plus more compiler testing infrastructure.
Direct compiler internals testing. It's really easy, you should probably
use it about 1000 times each. Look at the test:
run/existentials-in-compiler.scala
The checkfile contains the (string representations of the) actual
existentials from the compiler to make sure they correspond properly to
the ones in the source.
Existentials were being printed with wildcards too freely; this has been
tightened up.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala b/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala index 4ea21b1c44..cf90577959 100644 --- a/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala +++ b/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala @@ -116,7 +116,7 @@ trait SyntheticMethods extends ast.TreeDSL { */ def canEqualMethod: Tree = ( createMethod(nme.canEqual_, List(AnyClass.tpe), BooleanClass.tpe)(m => - Ident(m.firstParam) IS_OBJ typeCaseType(clazz)) + Ident(m.firstParam) IS_OBJ classExistentialType(clazz)) ) /** The equality method for case classes. @@ -132,7 +132,7 @@ trait SyntheticMethods extends ast.TreeDSL { */ def equalsClassMethod: Tree = createMethod(nme.equals_, List(AnyClass.tpe), BooleanClass.tpe) { m => val arg0 = Ident(m.firstParam) - val thatTest = gen.mkIsInstanceOf(arg0, typeCaseType(clazz), true, false) + val thatTest = gen.mkIsInstanceOf(arg0, classExistentialType(clazz), true, false) val thatCast = gen.mkCast(arg0, clazz.tpe) def argsBody: Tree = { |