From e7763d39da01c0394f1dc602167fd29c5b972d94 Mon Sep 17 00:00:00 2001 From: Miles Sabin Date: Fri, 9 Oct 2009 20:59:59 +0000 Subject: Don't fold List.apply() to Nil in presentation ... Don't fold List.apply() to Nil in presentation mode. --- src/compiler/scala/tools/nsc/typechecker/Typers.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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))) -- cgit v1.2.3