diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2014-02-17 22:05:14 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2014-02-18 09:22:43 +0100 |
commit | 34532d7e92b8ed2a9411260007fcfcc00f377ccc (patch) | |
tree | 8d41c4041a2fcfd3be356b7f96603bb5ae62ef27 /test/files/pos/t8300-overloading.scala | |
parent | 185de09b79088e83f766d4b60adc896ad01edd31 (diff) | |
download | scala-34532d7e92b8ed2a9411260007fcfcc00f377ccc.tar.gz scala-34532d7e92b8ed2a9411260007fcfcc00f377ccc.tar.bz2 scala-34532d7e92b8ed2a9411260007fcfcc00f377ccc.zip |
tests for SI-8300
Highlights the dilemma with rich type members in the cake that no longer
exists. One used to have to choose between overloading or patmat/extmeth
friendliness, but couldn't have both. Thanks to retronym we can have it all.
Diffstat (limited to 'test/files/pos/t8300-overloading.scala')
-rw-r--r-- | test/files/pos/t8300-overloading.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/pos/t8300-overloading.scala b/test/files/pos/t8300-overloading.scala new file mode 100644 index 0000000000..ae9699ab86 --- /dev/null +++ b/test/files/pos/t8300-overloading.scala @@ -0,0 +1,16 @@ +// cf. neg/t8300-overloading.scala +trait Universe { + type Name >: Null <: AnyRef with NameApi + trait NameApi + + type TermName >: Null <: TermNameApi with Name + trait TermNameApi extends NameApi +} + +object Test extends App { + val u: Universe = ??? + import u._ + + def foo(name: Name) = ??? + def foo(name: TermName) = ??? +}
\ No newline at end of file |