Commit b86b48ed authored by Steffen Michels's avatar Steffen Michels

fix children type checking for case in which children don't have a valid...

fix children type checking for case in which children don't have a valid value, but consecutive children have
parent ac7b51c8
Pipeline #23716 passed with stage
in 5 minutes and 58 seconds
...@@ -298,7 +298,7 @@ where ...@@ -298,7 +298,7 @@ where
| e =: JSONNull || e =: (JSONArray []) // A null or an empty array are accepted as a reset events | e =: JSONNull || e =: (JSONArray []) // A null or an empty array are accepted as a reset events
//If necessary remove the fields of the previously selected cons //If necessary remove the fields of the previously selected cons
# change = ChangeUI [] $ removeNChildren $ length childSts # change = ChangeUI [] $ removeNChildren $ length childSts
= (Ok (change, Nothing, [nullState: childSts]), vst) = (Ok (change, Nothing, [nullState]), vst)
| otherwise | otherwise
= (Error $ concat ["Unknown dynamic editor select event: '", toString e, "'"], vst) = (Error $ concat ["Unknown dynamic editor select event: '", toString e, "'"], vst)
...@@ -502,7 +502,9 @@ where ...@@ -502,7 +502,9 @@ where
where where
childTypesAreMatching` :: !Dynamic ![Maybe Dynamic] -> MaybeErrorString () childTypesAreMatching` :: !Dynamic ![Maybe Dynamic] -> MaybeErrorString ()
childTypesAreMatching` _ [] = Ok () childTypesAreMatching` _ [] = Ok ()
childTypesAreMatching` cons [Nothing: otherArgs] = childTypesAreMatching` cons otherArgs childTypesAreMatching` cons [Nothing: otherArgs] =
case cons of
(cons` :: a -> z) = childTypesAreMatching` (dynamic cons` undef) otherArgs
childTypesAreMatching` cons [Just nextArg: otherArgs] = childTypesAreMatching` cons [Just nextArg: otherArgs] =
case (cons, nextArg) of case (cons, nextArg) of
// `cons` undef` has type z`, which is z updated by unifying the type of the next arg // `cons` undef` has type z`, which is z updated by unifying the type of the next arg
......
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