Commit 9edb4b39 authored by Kai-Oliver Prott's avatar Kai-Oliver Prott

Fix wrong error message when a label in a RecordUpdate is missing

parent 710c052a
......@@ -1117,9 +1117,10 @@ checkLabels _ (Just c) ls css = do
[l | (l, cs) <- zip ls css, c' `notElem` cs]
_ -> internalError $
"Checks.SyntaxCheck.checkLabels: " ++ show c
checkLabels p Nothing ls css =
when (null (foldr1 intersect css))
$ report $ errNoCommonCons (spanInfo2Pos p) ls
checkLabels p Nothing ls css
| not (null (foldr1 intersect css)) ||
any null css = ok
| otherwise = report $ errNoCommonCons (spanInfo2Pos p) ls
checkField :: (a -> SCM a) -> Field a -> SCM (Field a)
checkField check (Field p l x) = Field p l <$> check x
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment