diff options
author | Martin Odersky <odersky@gmail.com> | 2015-03-04 13:52:44 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-03-18 11:14:14 +0100 |
commit | 96fbd7bfe252026f59d1f5e8aa33f2d8fae65769 (patch) | |
tree | c4a53211dbf23913eb8174f74e248c16f1c26bab /tests/pos/pickleOK/templateParents.scala | |
parent | e926f3167f8d9a1407f131abcb33a02b07477597 (diff) | |
download | dotty-96fbd7bfe252026f59d1f5e8aa33f2d8fae65769.tar.gz dotty-96fbd7bfe252026f59d1f5e8aa33f2d8fae65769.tar.bz2 dotty-96fbd7bfe252026f59d1f5e8aa33f2d8fae65769.zip |
Allow several units to be pickle-tested at once.
Also: Make Pickler a plain phase; it is neither a macro transformer nor
a miniphase.
Add tests to pickleOK that are known to be stable under pickling/unpicking
by comparing tree representations via show.
Diffstat (limited to 'tests/pos/pickleOK/templateParents.scala')
-rw-r--r-- | tests/pos/pickleOK/templateParents.scala | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/pos/pickleOK/templateParents.scala b/tests/pos/pickleOK/templateParents.scala new file mode 100644 index 000000000..316d8c81c --- /dev/null +++ b/tests/pos/pickleOK/templateParents.scala @@ -0,0 +1,24 @@ +object templateParents { + + // traits do not call a constructor + class C[+T](val x: T) + trait D extends C[String] + trait E extends C[Int] + class F extends C[Boolean](true) { + def foo = x + } + new C("abc") with D + +} + +object templateParents1 { + // tests inference of synthesized class type + class C[+T] + trait D extends C[String] + trait E extends C[Int] + + val x = new D with E + + val y: C[Int & String] = x +} + |