aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/i2152.scala
diff options
context:
space:
mode:
authorliu fengyun <liu@fengy.me>2017-04-13 15:03:13 +0200
committerGitHub <noreply@github.com>2017-04-13 15:03:13 +0200
commitfb4adc3c9c55476d2fe0deed22cff54e8e945406 (patch)
treeb7577f66688ed793a73ff543042a140e62cbe80d /tests/pos/i2152.scala
parentcf37737f56db7bc2f7429f78328dc5eea1716356 (diff)
parentde6461ab17562dbb46a1ff094590e051d03cb54c (diff)
downloaddotty-fb4adc3c9c55476d2fe0deed22cff54e8e945406.tar.gz
dotty-fb4adc3c9c55476d2fe0deed22cff54e8e945406.tar.bz2
dotty-fb4adc3c9c55476d2fe0deed22cff54e8e945406.zip
Merge branch 'master' into fix-2253
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))
+}