mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 03:32:51 -06:00
bugfix in the compiler for linref of empty record
This commit is contained in:
@@ -191,8 +191,9 @@ mkLinReference gr typ =
|
|||||||
[] -> Bad "no string"
|
[] -> Bad "no string"
|
||||||
(p:ps) -> mkDefField ty (S trm p)
|
(p:ps) -> mkDefField ty (S trm p)
|
||||||
Sort s | s == cStr -> return trm
|
Sort s | s == cStr -> return trm
|
||||||
QC p -> Bad "no string"
|
QC p -> Bad "no string"
|
||||||
RecType rs -> do
|
RecType [] -> Bad "no string"
|
||||||
|
RecType rs -> do
|
||||||
msum (map (\(l,ty) -> mkDefField ty (P trm l)) (sortRec rs))
|
msum (map (\(l,ty) -> mkDefField ty (P trm l)) (sortRec rs))
|
||||||
_ | Just _ <- isTypeInts typ -> Bad "no string"
|
_ | Just _ <- isTypeInts typ -> Bad "no string"
|
||||||
_ -> Bad (render (text "linearization type field cannot be" <+> ppTerm Unqualified 0 typ))
|
_ -> Bad (render (text "linearization type field cannot be" <+> ppTerm Unqualified 0 typ))
|
||||||
|
|||||||
Reference in New Issue
Block a user