Skip to content
Snippets Groups Projects
Commit 47028320 authored by Emmanouil (Manos) Koukoutos's avatar Emmanouil (Manos) Koukoutos
Browse files

Make Literals and LiteralPatterns covariant

parent b1408d30
No related branches found
No related tags found
No related merge requests found
...@@ -230,7 +230,7 @@ object Trees { ...@@ -230,7 +230,7 @@ object Trees {
case class TuplePattern(binder: Option[Identifier], subPatterns: Seq[Pattern]) extends Pattern case class TuplePattern(binder: Option[Identifier], subPatterns: Seq[Pattern]) extends Pattern
case class LiteralPattern[T](binder: Option[Identifier], lit : Literal[T]) extends Pattern { case class LiteralPattern[+T](binder: Option[Identifier], lit : Literal[T]) extends Pattern {
val subPatterns = Seq() val subPatterns = Seq()
} }
...@@ -431,7 +431,7 @@ object Trees { ...@@ -431,7 +431,7 @@ object Trees {
} }
/* Literals */ /* Literals */
sealed abstract class Literal[T] extends Expr with Terminal { sealed abstract class Literal[+T] extends Expr with Terminal {
val value: T val value: T
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment