Soilihi BEN SOILIHI BOINA pushed to branch add-proj at Stefan / Typer
Commits: 6a7a6f99 by Soilih at 2022-01-17T00:51:24-07:00 fixing add-proj
- - - - -
1 changed file:
- src/opslexp.ml
Changes:
===================================== src/opslexp.ml ===================================== @@ -771,8 +771,8 @@ and check'' erased ctx e = | [] -> log_tc_error ~loc:l "Tuple has no field named: %s" label; etype | (ak, (_, Some fn), ftype)::_ when fn = label (* We found our field! *) - -> if ak = Aerasable - then mkSusp ftype s (* Yay! We found our field! *) + -> if not (ak = Aerasable) + then mkSusp ftype s (* Yay! We found our field! *) else (log_tc_error ~loc:l "Can't Proj an erasale field: %s" label; etype) | (ak, vdef, ftype)::fieldtypes -> let fvdef vdef e loc lbl = @@ -1079,7 +1079,7 @@ and get_type ctx e = | [] -> log_tc_error ~loc:l "Tuple has no field named: %s" label; etype | (ak, (_, Some fn), ftype)::_ when fn = label (* We found our field! *) - -> if ak = Aerasable + -> if not (ak = Aerasable) then mkSusp ftype s (* Yay! We found our field! *) else (log_tc_error ~loc:l "Can't Proj an erasale field: %s" label; etype) | (ak, vdef, ftype)::fieldtypes
View it on GitLab: https://gitlab.com/monnier/typer/-/commit/6a7a6f997f9cbaf7a28134706de2bbd48e...