diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/pos/hkgadt.scala | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/files/pos/hkgadt.scala b/test/files/pos/hkgadt.scala new file mode 100644 index 0000000000..efd7d3df21 --- /dev/null +++ b/test/files/pos/hkgadt.scala @@ -0,0 +1,18 @@ +package test + +object HKGADT { + sealed trait Foo[F[_]] + final case class Bar() extends Foo[List] + + def frob[F[_]](foo: Foo[F]): F[Int] = + foo match { + case Bar() => + List(1) + } + + sealed trait Foo1[F] + final case class Bar1() extends Foo1[Int] + def frob1[A](foo: Foo1[A]) = foo match { + case Bar1() => 1 + } +} |