diff options
author | Paul Phillips <paulp@improving.org> | 2012-02-13 21:55:15 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-02-13 23:17:31 -0800 |
commit | eb8556ca663de9bf77514eab6e63f0a2f7599413 (patch) | |
tree | 478db0a6e25c20961559fffc3f7d562644a8eb98 /test/files/pos | |
parent | 57758b518b2409ea0cc1aa0be7853025aa053ab8 (diff) | |
download | scala-eb8556ca663de9bf77514eab6e63f0a2f7599413.tar.gz scala-eb8556ca663de9bf77514eab6e63f0a2f7599413.tar.bz2 scala-eb8556ca663de9bf77514eab6e63f0a2f7599413.zip |
Fix for SI-5444.
Fix for trait/impl renaming in 5cbd7d06eb was incomplete.
Looks more complete now.
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t5444.scala | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/test/files/pos/t5444.scala b/test/files/pos/t5444.scala new file mode 100644 index 0000000000..df6b2ce4f8 --- /dev/null +++ b/test/files/pos/t5444.scala @@ -0,0 +1,42 @@ +// /scala/trac/5444/a.scala +// Mon Feb 13 21:01:45 PST 2012 + +// Traits require identical names to reproduce. +class Test { + def a() = { + trait T { + def x() = 1 + } + trait U { + def x1() = 2 + } + class Bippy extends T with U { def z() = x() + x1() } + new Bippy + } + def b() { + trait T { + def y() = 3 + trait T2 { + def yy() = 10 + } + } + trait U { + def y1() = 4 + trait T3 { + def yy() = 11 + } + } + class Bippy extends T with U { def z() = y() + y1() + (1 to (new T2 { }).yy()).map(_ + 1).sum } + (new Bippy).z() + } + def c() { + trait T { + def z() = 5 + } + trait U { + def z1() = 6 + } + (new Test with T with U).z1() + } +} + |