diff options
author | Martin Odersky <odersky@gmail.com> | 2016-07-13 15:17:17 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-07-13 15:33:47 +0200 |
commit | 18b30803952cee83580eab28068bc773fdce780e (patch) | |
tree | 03c603f0920da2b987d9b93b5b820c099f9049e5 /tests | |
parent | 0ff5354e2a5e3f29234d6d761177f9228d8da522 (diff) | |
download | dotty-18b30803952cee83580eab28068bc773fdce780e.tar.gz dotty-18b30803952cee83580eab28068bc773fdce780e.tar.bz2 dotty-18b30803952cee83580eab28068bc773fdce780e.zip |
Allow hk parameters in lower bounds
Diffstat (limited to 'tests')
-rw-r--r-- | tests/neg/hklower.scala | 11 | ||||
-rw-r--r-- | tests/neg/hklower2.scala | 4 | ||||
-rw-r--r-- | tests/pos/hklower.scala | 11 |
3 files changed, 15 insertions, 11 deletions
diff --git a/tests/neg/hklower.scala b/tests/neg/hklower.scala deleted file mode 100644 index e1e79070e..000000000 --- a/tests/neg/hklower.scala +++ /dev/null @@ -1,11 +0,0 @@ -class Test { // error: conflicting bounds - - type T[X] // OK - type U[X] = T[X] // OK - - type V[X] >: T[X] // error - type W[X] >: T[X] <: T[X] // error - - def f[C[X] >: T[X]]() = ??? // error - -} diff --git a/tests/neg/hklower2.scala b/tests/neg/hklower2.scala new file mode 100644 index 000000000..8268bf09f --- /dev/null +++ b/tests/neg/hklower2.scala @@ -0,0 +1,4 @@ +class Test { // error: conflicting bounds + trait T[X] + type Z[X] >: String <: T[X] +} diff --git a/tests/pos/hklower.scala b/tests/pos/hklower.scala new file mode 100644 index 000000000..033ee3a34 --- /dev/null +++ b/tests/pos/hklower.scala @@ -0,0 +1,11 @@ +class Test { // error: conflicting bounds + + type T[X] + type U[X] = T[X] + + type V[X] >: T[X] + type W[X] >: T[X] <: T[X] + + def f[C[X] >: T[X]]() = ??? + +} |