From 8dd1635f7f4661e39eb9b77a56e14f92e0379786 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 8 Apr 2004 15:58:45 +0000 Subject: *** empty log message *** --- sources/scalac/ast/TreeGen.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sources/scalac/ast') diff --git a/sources/scalac/ast/TreeGen.java b/sources/scalac/ast/TreeGen.java index 4abd940f9c..405f14d618 100644 --- a/sources/scalac/ast/TreeGen.java +++ b/sources/scalac/ast/TreeGen.java @@ -356,14 +356,16 @@ public class TreeGen implements Kinds, Modifiers, TypeTags { */ public Tree mkApplyTV(int pos, Tree fn, Type[] targs, Tree[] vargs) { if (targs.length != 0) fn = TypeApply(pos, fn, mkTypes(pos, targs)); - return Apply(pos, fn, vargs); + if (vargs.length == 0 && fn.getType().isObjectType()) return fn; + else return Apply(pos, fn, vargs); } public Tree mkApplyTV(Tree fn, Type[] targs, Tree[] vargs) { return mkApplyTV(fn.pos, fn, targs, vargs); } public Tree mkApplyTV(int pos, Tree fn, Tree[] targs, Tree[] vargs) { if (targs.length != 0) fn = TypeApply(pos, fn, targs); - return Apply(pos, fn, vargs); + if (vargs.length == 0 && fn.getType().isObjectType()) return fn; + else return Apply(pos, fn, vargs); } public Tree mkApplyTV(Tree fn, Tree[] targs, Tree[] vargs) { return mkApplyTV(fn.pos, fn, targs, vargs); -- cgit v1.2.3