summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorMiles Sabin <miles@milessabin.com>2009-10-09 20:59:59 +0000
committerMiles Sabin <miles@milessabin.com>2009-10-09 20:59:59 +0000
commite7763d39da01c0394f1dc602167fd29c5b972d94 (patch)
treedef6a38c051fc324f5b2414d877bc54b30800b89 /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parent6c3a2d29f6ffd14b1f6140ea21a7911736eb094a (diff)
downloadscala-e7763d39da01c0394f1dc602167fd29c5b972d94.tar.gz
scala-e7763d39da01c0394f1dc602167fd29c5b972d94.tar.bz2
scala-e7763d39da01c0394f1dc602167fd29c5b972d94.zip
Don't fold List.apply() to Nil in presentation ...
Don't fold List.apply() to Nil in presentation mode.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 030c71b0bf..7c09df68d3 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -2162,7 +2162,7 @@ trait Typers { self: Analyzer =>
}
}
- if (fun.symbol == List_apply && args.isEmpty) {
+ if (fun.symbol == List_apply && args.isEmpty && !onlyPresentation) {
atPos(tree.pos) { gen.mkNil setType restpe }
} else {
constfold(treeCopy.Apply(tree, fun, args1).setType(ifPatternSkipFormals(restpe)))