diff options
author | Martin Odersky <odersky@gmail.com> | 2016-07-12 17:12:59 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-07-12 18:14:04 +0200 |
commit | 84a1a7ae7b1e4931fe04a5a21a04bb858e8acebb (patch) | |
tree | 0cb537aeafff402970ce51c0790cd9ba4e8de846 /tests/pos/t2712-6.scala | |
parent | cdebd91712b36b048233d7cf9501cc7a5bb50b31 (diff) | |
download | dotty-84a1a7ae7b1e4931fe04a5a21a04bb858e8acebb.tar.gz dotty-84a1a7ae7b1e4931fe04a5a21a04bb858e8acebb.tar.bz2 dotty-84a1a7ae7b1e4931fe04a5a21a04bb858e8acebb.zip |
Avoid dealiasing on type application
When applying a type alias of a type lambda, keep the original
application instead of reducing. But reduce anyway if
- the reduced type is an application where the type
constructor has the same kind as the original type constructor, or
- some of the arguments are wildcards.
Diffstat (limited to 'tests/pos/t2712-6.scala')
-rw-r--r-- | tests/pos/t2712-6.scala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/pos/t2712-6.scala b/tests/pos/t2712-6.scala new file mode 100644 index 000000000..dbba60472 --- /dev/null +++ b/tests/pos/t2712-6.scala @@ -0,0 +1,12 @@ +package test + +object Tags { + type Tagged[A, T] = {type Tag = T; type Self = A} + + type @@[T, Tag] = Tagged[T, Tag] + + trait Disjunction + + def meh[M[_], A](ma: M[A]): M[A] = ma + meh(null: Int @@ Disjunction)//.asInstanceOf[Int @@ Disjunction]) +} |