From ed63344a2dae7731c01737102fbe12b7ad10ba77 Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Thu, 14 Jul 2016 13:23:44 -0700 Subject: SI-2458 Make spec example live test Synchronize the live test with the spec update, which is trivial. Also add a neg test showing that an imported name remains ambiguous even if it resolves to the definition in scope with which it is ambiguous. --- test/files/neg/ambiguous-same.scala | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/files/neg/ambiguous-same.scala (limited to 'test/files/neg/ambiguous-same.scala') diff --git a/test/files/neg/ambiguous-same.scala b/test/files/neg/ambiguous-same.scala new file mode 100644 index 0000000000..50dba71f67 --- /dev/null +++ b/test/files/neg/ambiguous-same.scala @@ -0,0 +1,15 @@ + +// When faced with ambiguities between imports, +// an attempt is made to see if the imports intend +// identical types. +// +// Here, no attempt is made to notice that x +// names the same thing. +// +object X { + val x = 42 + def f = { + import X.x + x + } +} -- cgit v1.2.3