diff options
author | liu fengyun <liu@fengy.me> | 2016-12-13 14:05:09 +0100 |
---|---|---|
committer | liu fengyun <liu@fengy.me> | 2016-12-13 16:48:09 +0100 |
commit | 31337d5223eb9c1824ca72ca399e22c1f2dfe990 (patch) | |
tree | 0cfa09153cec3fa7b639e6cd6d35d53cbad1bdff /compiler | |
parent | 7775aab98ce98151d198e88bb676158f58f0cf57 (diff) | |
download | dotty-31337d5223eb9c1824ca72ca399e22c1f2dfe990.tar.gz dotty-31337d5223eb9c1824ca72ca399e22c1f2dfe990.tar.bz2 dotty-31337d5223eb9c1824ca72ca399e22c1f2dfe990.zip |
Fix #1786: support use package object in fun call
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/src/dotty/tools/dotc/typer/Checking.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Checking.scala b/compiler/src/dotty/tools/dotc/typer/Checking.scala index 0c5a8e5db..d80dfe7c0 100644 --- a/compiler/src/dotty/tools/dotc/typer/Checking.scala +++ b/compiler/src/dotty/tools/dotc/typer/Checking.scala @@ -418,7 +418,7 @@ trait Checking { /** Check that Java statics and packages can only be used in selections. */ def checkValue(tree: Tree, proto: Type)(implicit ctx: Context): tree.type = { - if (!proto.isInstanceOf[SelectionProto]) { + if (!proto.isInstanceOf[SelectionProto] && !proto.isInstanceOf[ApplyingProto]) { val sym = tree.tpe.termSymbol // The check is avoided inside Java compilation units because it always fails // on the singleton type Module.type. |