summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-06-25 21:25:12 +0000
committerPaul Phillips <paulp@improving.org>2011-06-25 21:25:12 +0000
commit924b5852faaf9074c3ba74631ad694fcc14f708a (patch)
treeb675db2aa92012e7f66fc0806f0652fe3650e975 /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
parent81964737687fbf8defd3c5798a48309ea19ac7ad (diff)
downloadscala-924b5852faaf9074c3ba74631ad694fcc14f708a.tar.gz
scala-924b5852faaf9074c3ba74631ad694fcc14f708a.tar.bz2
scala-924b5852faaf9074c3ba74631ad694fcc14f708a.zip
Generalizing some TreeGen machinery on an oppor...
Generalizing some TreeGen machinery on an opportunistic basis. Better documenting how Class types and classOf are implemented. Cleaning up the manifest code. No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
index 40e3aea1d7..6ff1302888 100644
--- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
@@ -1265,7 +1265,7 @@ abstract class RefChecks extends InfoTransform {
}
}
val newResult = localTyper.typedPos(tree.pos) {
- new ApplyToImplicitArgs(Apply(Select(gen.mkAttributedRef(ArrayModule), nme.ofDim), args), List(manif))
+ new ApplyToImplicitArgs(gen.mkMethodCall(ArrayModule, nme.ofDim, args), List(manif))
}
currentApplication = tree
newResult
@@ -1336,8 +1336,10 @@ abstract class RefChecks extends InfoTransform {
var result: Tree = tree match {
case DefDef(mods, name, tparams, vparams, tpt, EmptyTree) if tree.symbol.hasAnnotation(NativeAttr) =>
tree.symbol.resetFlag(DEFERRED)
- transform(treeCopy.DefDef(tree, mods, name, tparams, vparams, tpt,
- typed(Apply(gen.mkAttributedRef(Sys_error), List(Literal("native method stub"))))))
+ transform(treeCopy.DefDef(
+ tree, mods, name, tparams, vparams, tpt,
+ typed(gen.mkSysErrorCall("native method stub"))
+ ))
case ValDef(_, _, _, _) | DefDef(_, _, _, _, _, _) =>
checkDeprecatedOvers(tree)