Commit 55113953 authored by László Domoszlai's avatar László Domoszlai

fix pattern matching bug

git-svn-id: https://svn.cs.ru.nl/repos/clean-sapl/branches/hierarchical@413 cb785ff4-4565-4a15-8565-04c4fcf96d79
parent 81cb1361
......@@ -608,7 +608,7 @@ where
termCoder t=:(SSelect expr patterns) s a
# a = a <++ "switch(" <++ forceTermCoder expr {s & cs_intrfunc = Nothing} <++ "){"
<++ termArrayCoder (map (\(p,b)=(p,b,False)) ps) "" s <++ "};"
<++ termArrayCoder (map (\(p,b)=(p,b,False)) ps) "" {s & cs_incaseexpr = True} <++ "};"
= case d of
(Just d) = a <++ termCoder (PDefault,d,False) s <++ ";"
= a <++ (if s.cs_incaseexpr "break;" "throw \"nomatch\";")
......
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