diff options
author | Dmitry Petrashko <dark@d-d.me> | 2015-05-28 17:13:33 +0200 |
---|---|---|
committer | Dmitry Petrashko <dark@d-d.me> | 2015-05-28 17:13:33 +0200 |
commit | ef274600378cc55b78ad62ac9afc8ce9a21efb89 (patch) | |
tree | 203cb9cf0aebf03d86b73e96db92ea1647f6d089 /tests/run/supercalls-traits.scala | |
parent | c533f81750d66a7c99bfb24aafc56a738db064bf (diff) | |
parent | 7779b8fefa745e8b034bc33f46d21bd8599ac4a0 (diff) | |
download | dotty-ef274600378cc55b78ad62ac9afc8ce9a21efb89.tar.gz dotty-ef274600378cc55b78ad62ac9afc8ce9a21efb89.tar.bz2 dotty-ef274600378cc55b78ad62ac9afc8ce9a21efb89.zip |
Merge pull request #611 from dotty-staging/supercalls-traits-test
Add a test for supercalls in traits.
Diffstat (limited to 'tests/run/supercalls-traits.scala')
-rw-r--r-- | tests/run/supercalls-traits.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/run/supercalls-traits.scala b/tests/run/supercalls-traits.scala new file mode 100644 index 000000000..09e841f46 --- /dev/null +++ b/tests/run/supercalls-traits.scala @@ -0,0 +1,15 @@ +trait A { + def foo = 1 +} + +trait B { + def foo = 2 +} + +class C extends A with B { + override def foo = super[A].foo + super[B].foo +} + +object Test { + def main(args: Array[String]) = assert(new C().foo == 3) +} |