summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan@lightbend.com>2017-02-14 17:00:17 -0800
committerGitHub <noreply@github.com>2017-02-14 17:00:17 -0800
commit4ae37504ca1df877780afac437795afb402cae6c (patch)
treebd3932c636933d43cfa3b6229ccae1a0e3c21698 /test
parented9352a43a14e5e4175ce987112318e588c4695b (diff)
parent1d41aef53506a4e697f848e790e03f204d05885d (diff)
downloadscala-4ae37504ca1df877780afac437795afb402cae6c.tar.gz
scala-4ae37504ca1df877780afac437795afb402cae6c.tar.bz2
scala-4ae37504ca1df877780afac437795afb402cae6c.zip
Merge pull request #5654 from retronym/ticket/10154
SI-10154 Fix implicit search regression for term-owned objects
Diffstat (limited to 'test')
-rw-r--r--test/files/pos/t10154.scala11
-rw-r--r--test/files/pos/t10154b.scala16
2 files changed, 27 insertions, 0 deletions
diff --git a/test/files/pos/t10154.scala b/test/files/pos/t10154.scala
new file mode 100644
index 0000000000..51616b71d6
--- /dev/null
+++ b/test/files/pos/t10154.scala
@@ -0,0 +1,11 @@
+trait Bar2[T]
+
+object Test2 {
+ def wrap {
+ object Foo {
+ implicit def fooBar: Bar2[Foo.type] = ???
+ }
+
+ implicitly[Bar2[Foo.type]]
+ }
+}
diff --git a/test/files/pos/t10154b.scala b/test/files/pos/t10154b.scala
new file mode 100644
index 0000000000..809a286c0e
--- /dev/null
+++ b/test/files/pos/t10154b.scala
@@ -0,0 +1,16 @@
+ import scala.language.existentials
+
+ class Bar[T]
+ class Test {
+ def method = {
+ object Foo {
+ implicit def x: Bar[Foo.type] = new Bar[Foo.type]
+ }
+ type T = Foo.type
+
+ {
+ object Foo
+ implicitly[Bar[T]]
+ }
+ }
+}