aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/i2152.scala
diff options
context:
space:
mode:
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))
+}