summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2008-05-30 18:00:25 +0000
committerMartin Odersky <odersky@gmail.com>2008-05-30 18:00:25 +0000
commit562647a37a6675fbf328f72e081a7f88913dd004 (patch)
tree36a8f00923e6991bf483af901f34ec31763111e0 /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parentb6281cd5a72fa31356020fab3929c6e0f4ad578f (diff)
downloadscala-562647a37a6675fbf328f72e081a7f88913dd004.tar.gz
scala-562647a37a6675fbf328f72e081a7f88913dd004.tar.bz2
scala-562647a37a6675fbf328f72e081a7f88913dd004.zip
fixed #807. More stuff for virtual classes.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index ce461952e1..be25970027 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -991,7 +991,10 @@ trait Typers { self: Analyzer =>
else
psym addChild context.owner
}
- if (!(selfType <:< parent.tpe.typeOfThis) && !phase.erasedTypes) { //@M .typeOfThis seems necessary
+ if (!(selfType <:< parent.tpe.typeOfThis) &&
+ !phase.erasedTypes &&
+ !(context.owner hasFlag SYNTHETIC)) // don't do this check for synthetic concrete classes for virtuals (part of DEVIRTUALIZE)
+ {
//Console.println(context.owner);//DEBUG
//Console.println(context.owner.unsafeTypeParams);//DEBUG
//Console.println(List.fromArray(context.owner.info.closure));//DEBUG
@@ -1628,7 +1631,7 @@ trait Typers { self: Analyzer =>
"I assume that the elements of this array should be passed as individual arguments to the vararg.\n"+
"Therefore I wrap the array in a `: _*', to mark it as a vararg argument.\n"+
"If that's not what you want, compile this file with option -Xno-varargs-conversion.")
- args0 = args.init ::: List(atPos(lastarg.pos) { Typed(lastarg, Ident(nme.WILDCARD_STAR.toTypeName)) })
+ args0 = args.init ::: List(gen.wildcardStar(args.last))
}
}
val suffix =