diff options
Diffstat (limited to 'tests/run/shortClass.scala')
-rw-r--r-- | tests/run/shortClass.scala | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/run/shortClass.scala b/tests/run/shortClass.scala new file mode 100644 index 000000000..c5c2043f4 --- /dev/null +++ b/tests/run/shortClass.scala @@ -0,0 +1,26 @@ +import scala.reflect.internal.util._ + +package bippity { + trait DingDongBippy + + package bop { + class Foo { + class Bar + object Bar + } + } +} + +object Test { + import bippity._ + import bop._ + + def printSanitized(x: String) = println(x.filterNot(_.isDigit)) + + def main(args: Array[String]): Unit = { + val f = new Foo + val instances = List(f, new f.Bar, f.Bar, new Foo with DingDongBippy, new f.Bar with DingDongBippy) + instances map (_.getClass.getName) foreach printSanitized + instances map shortClassOfInstance foreach printSanitized + } +} |