mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-09-15 23:06:01 -06:00
don't typecheck record fields that are going to be discarded
This commit is contained in:
@@ -654,9 +654,7 @@ checkRecFields scope c ((l,t):lts) ltys =
|
|||||||
lttys <- checkRecFields scope c2 lts ltys
|
lttys <- checkRecFields scope c2 lts ltys
|
||||||
return (ltty : lttys)
|
return (ltty : lttys)
|
||||||
(Nothing,ltys) -> do evalWarn ("Discarded field:" <+> l)
|
(Nothing,ltys) -> do evalWarn ("Discarded field:" <+> l)
|
||||||
let (c1,c2) = split c
|
lttys <- checkRecFields scope c lts ltys
|
||||||
ltty <- tcRecField scope c1 l t Nothing
|
|
||||||
lttys <- checkRecFields scope c2 lts ltys
|
|
||||||
return lttys -- ignore the field
|
return lttys -- ignore the field
|
||||||
where
|
where
|
||||||
takeIt l1 [] = (Nothing, [])
|
takeIt l1 [] = (Nothing, [])
|
||||||
|
|||||||
Reference in New Issue
Block a user