on master help sign in
Check the overall record type last, pinning down more types for error messages
commitcd20a9c268d311434fc7063a4a2b9bac60fb4030 authorEvan Czaplicki <info@elm-lang.org> dateWed 6 May 2015, 15:26 (11 years ago) parentcd7ff6c
1 file changed+1−1
src/Type/Constrain/Expression.hs+1−1
src/Type/Constrain/Expression.hs+1−1
@@ -160,7 +160,7 @@ constrain env (A.A region expression) tipe =
160160 (map varN vars)
161161 let fields' = ST.fieldMap (zip (map fst fields) (map varN vars))
162162 let recordType = record fields' (termN EmptyRecord1)
163− return (ex vars (CAnd (tipe === recordType : fieldCons)))
163+ return (ex vars (CAnd (fieldCons ++ [tipe === recordType])))
164164
165165 E.Let defs body ->
166166 do bodyCon <- constrain env body tipe