diff --git a/src/compiler/GF/Compile/Optimize.hs b/src/compiler/GF/Compile/Optimize.hs index 28d0a7acb..4fec7e0b6 100644 --- a/src/compiler/GF/Compile/Optimize.hs +++ b/src/compiler/GF/Compile/Optimize.hs @@ -195,6 +195,7 @@ mkLinReference gr typ = RecType [] -> Bad "no string" RecType rs -> do msum (map (\(l,ty) -> mkDefField ty (P trm l)) (sortRec rs)) + `mplus` Bad "no string" _ | Just _ <- isTypeInts typ -> Bad "no string" _ -> Bad (render ("linearization type field cannot be" <+> typ))