aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/Labels.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos/Labels.scala')
-rw-r--r--tests/pos/Labels.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/pos/Labels.scala b/tests/pos/Labels.scala
index 4a84175af..d82287313 100644
--- a/tests/pos/Labels.scala
+++ b/tests/pos/Labels.scala
@@ -1,3 +1,7 @@
+import dotty.tools.dotc.ast.Trees.Thicket
+import dotty.tools.dotc.ast.tpd._
+
+
object Labels {
def main(args: Array[String]): Unit = {
var i = 10
@@ -18,4 +22,17 @@ object Labels {
case t@2 => println("two" + t)
case _ => println("default")
}
+
+ def flatten(trees: Tree): Int = {
+ trees match {
+ case Thicket(elems) =>
+ while (trees ne trees) {
+ }
+ case tree =>
+ 33
+ }
+ 55
+ }
+
+
}