refactor: fail on ?
snd or fst type-check result
This commit is contained in:
parent
f143f685c4
commit
4e10fb3fda
@ -203,7 +203,6 @@ object typeChecker {
|
||||
) match {
|
||||
case what @ KnownType.Pair(left, _) =>
|
||||
left.satisfies(constraint, elem.pos)
|
||||
case ? => ?.satisfies(constraint, elem.pos)
|
||||
case _ => ctx.error(Error.InternalError(elem.pos, "fst must be applied to a pair"))
|
||||
} // satisfies constraint
|
||||
case Snd(elem) =>
|
||||
@ -212,7 +211,6 @@ object typeChecker {
|
||||
Constraint.Is(KnownType.Pair(?, ?), "snd must be applied to a pair")
|
||||
) match {
|
||||
case KnownType.Pair(_, right) => right.satisfies(constraint, elem.pos)
|
||||
case ? => ?.satisfies(constraint, elem.pos)
|
||||
case _ => ctx.error(Error.InternalError(elem.pos, "snd must be applied to a pair"))
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user