From 31337d5223eb9c1824ca72ca399e22c1f2dfe990 Mon Sep 17 00:00:00 2001 From: liu fengyun Date: Tue, 13 Dec 2016 14:05:09 +0100 Subject: Fix #1786: support use package object in fun call --- tests/neg/i1786.scala | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/neg/i1786.scala (limited to 'tests/neg/i1786.scala') diff --git a/tests/neg/i1786.scala b/tests/neg/i1786.scala new file mode 100644 index 000000000..7bf513ed8 --- /dev/null +++ b/tests/neg/i1786.scala @@ -0,0 +1,17 @@ +package scala + +package object meta { + def apply(x: Int): Int = x * x +} + +class Test { + def f(a: Any): Any = f(meta) // error + def g(a: Any): Any = f(scala.meta) // error + + meta { 5 + 4 } + + scala.meta { 3 } + + val m1 = meta // error + val m2 = scala.meta // error +} -- cgit v1.2.3