Skip to content
Snippets Groups Projects
Commit 4a2e8eec authored by Etienne Kneuss's avatar Etienne Kneuss
Browse files

Fix bug with passes filtering too many cases:

((), Nil()) passes {
  case () => Cons(0, Nil())
}

was true(!) because Nil </: Cons and Cons </: Nil which caused the case
to filtered out silently.
parent 4a25637d
Branches
Tags
No related merge requests found
...@@ -145,7 +145,7 @@ object Constructors { ...@@ -145,7 +145,7 @@ object Constructors {
resType match { resType match {
case Some(tpe) => case Some(tpe) =>
casesFiltered.filter(c => isSubtypeOf(c.rhs.getType, tpe) || isSubtypeOf(tpe, c.rhs.getType)) casesFiltered.filter(c => typesCompatible(c.rhs.getType, tpe))
case None => case None =>
casesFiltered casesFiltered
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment