From 7f4201f4ade70dca2d474079b394e2ad308631d6 Mon Sep 17 00:00:00 2001 From: Jamie Thompson Date: Fri, 31 Jan 2020 15:51:43 +0100 Subject: [PATCH] Add test for tasty tags POLYType METHODtype GIVENMETHODtype and SUPERtype --- tests/pos/tasty-tags-obscure.scala | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/pos/tasty-tags-obscure.scala diff --git a/tests/pos/tasty-tags-obscure.scala b/tests/pos/tasty-tags-obscure.scala new file mode 100644 index 000000000000..c40040334103 --- /dev/null +++ b/tests/pos/tasty-tags-obscure.scala @@ -0,0 +1,17 @@ +object ObscureTasty + + def foo(f: [t] => List[t] ?=> Unit) = ??? + def test1 = foo([t] => (a: List[t]) ?=> ()) // POLYtype => GIVENMETHODType + def bar(f: [t] => List[t] => Unit) = ??? + def test2 = bar([t] => (a: List[t]) => ()) // POLYtype => METHODType + + class Bar + final val bar = "Bar.bar" + + class Foo extends Bar + object A + def unapply(a: Any): Some[Foo.super.bar.type] = ??? + + def foo = + "" match + case A(x) => x // SUPERtype