aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/i2152.scala
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2017-04-13 12:28:17 +0200
committerGitHub <noreply@github.com>2017-04-13 12:28:17 +0200
commit6b041ee7b5df98a84c3fbf31b8392fe77152529d (patch)
treeac7856bb41ae216d5aa2972d3e26b02badc9292f /tests/pos/i2152.scala
parentb8ed254e38480eb8892eccd897d525d977d9e6a7 (diff)
parentaaff621f552e6824db4f7c1d73d9e8941e088d96 (diff)
downloaddotty-6b041ee7b5df98a84c3fbf31b8392fe77152529d.tar.gz
dotty-6b041ee7b5df98a84c3fbf31b8392fe77152529d.tar.bz2
dotty-6b041ee7b5df98a84c3fbf31b8392fe77152529d.zip
Merge pull request #2209 from dotty-staging/fix-#2152
Fix #2152: Instantiate dependent result type parameters
Diffstat (limited to 'tests/pos/i2152.scala')
-rw-r--r--tests/pos/i2152.scala7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/pos/i2152.scala b/tests/pos/i2152.scala
new file mode 100644
index 000000000..2171a487e
--- /dev/null
+++ b/tests/pos/i2152.scala
@@ -0,0 +1,7 @@
+class Contra[-D](task: AnyRef)
+object Test {
+ def narrow(task: AnyRef): Contra[task.type] = new Contra(task)
+ def ident[Before](elems: Contra[Before]): Contra[Before] = elems
+ val foo = null
+ ident(narrow(foo))
+}