summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2014-03-15 11:33:54 +0000
committerkr.angelov <kr.angelov@gmail.com>2014-03-15 11:33:54 +0000
commit7dd5748fa84f0cfa44f28dff5b4c5d964611fa3f (patch)
tree90ed0b1456997e928d46abe33d6447886a2d1e0d /src/compiler/GF/Compile
parent55e2bfb9eb7fd02f225c1795c4a36af5d03ad85b (diff)
bugfix in the compiler for linref of empty record
Diffstat (limited to 'src/compiler/GF/Compile')
-rw-r--r--src/compiler/GF/Compile/Optimize.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/GF/Compile/Optimize.hs b/src/compiler/GF/Compile/Optimize.hs
index 9d15a9970..ad4f42b50 100644
--- a/src/compiler/GF/Compile/Optimize.hs
+++ b/src/compiler/GF/Compile/Optimize.hs
@@ -191,8 +191,9 @@ mkLinReference gr typ =
[] -> Bad "no string"
(p:ps) -> mkDefField ty (S trm p)
Sort s | s == cStr -> return trm
- QC p -> Bad "no string"
- RecType rs -> do
+ QC p -> Bad "no string"
+ RecType [] -> Bad "no string"
+ RecType rs -> do
msum (map (\(l,ty) -> mkDefField ty (P trm l)) (sortRec rs))
_ | Just _ <- isTypeInts typ -> Bad "no string"
_ -> Bad (render (text "linearization type field cannot be" <+> ppTerm Unqualified 0 typ))