diff options
author | Martin Odersky <odersky@gmail.com> | 2016-01-09 14:39:44 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-02-19 14:00:00 +0100 |
commit | 5a8e87004f563feafbaf16e78bd0d6be26ee6e1c (patch) | |
tree | e81bb81e43922a24859aaab31986d5f256059788 /tests/pos | |
parent | 91ccb52bda344d74ba7a3e9859346e57051d2aff (diff) | |
download | dotty-5a8e87004f563feafbaf16e78bd0d6be26ee6e1c.tar.gz dotty-5a8e87004f563feafbaf16e78bd0d6be26ee6e1c.tar.bz2 dotty-5a8e87004f563feafbaf16e78bd0d6be26ee6e1c.zip |
First version of named type arguments
Diffstat (limited to 'tests/pos')
-rw-r--r-- | tests/pos/named-params.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/pos/named-params.scala b/tests/pos/named-params.scala new file mode 100644 index 000000000..51041078d --- /dev/null +++ b/tests/pos/named-params.scala @@ -0,0 +1,17 @@ +package namedparams + +abstract class C[type Elem, type Value](val elem: Elem) { + def toVal: Elem = ??? +} + + + +object Test { + val c = new C[String, String]("A") { + override def toVal = elem + } + val x: c.Elem = c.elem + + val c2: C { type Elem = String } = c + val x2: c2.Elem = c2.elem +} |