diff options
Diffstat (limited to 'test/pending')
-rw-r--r-- | test/pending/neg/tcpoly_variance_enforce_getter_setter.scala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/pending/neg/tcpoly_variance_enforce_getter_setter.scala b/test/pending/neg/tcpoly_variance_enforce_getter_setter.scala new file mode 100644 index 0000000000..7888b9e2a1 --- /dev/null +++ b/test/pending/neg/tcpoly_variance_enforce_getter_setter.scala @@ -0,0 +1,12 @@ +trait coll[+m[+x]] + +class FooInvar[x] +class FooContra[-x] +class FooCov[+x] + +object test { + var ok: coll[FooCov] = _ + + var x: coll[FooInvar] = _ // TODO: error should be reported only once instead of separately for getter and setter + var y: coll[FooContra] = _ +}
\ No newline at end of file |