Closed JSAbrahams closed 2 years ago
Perhaps we are missing a substitute rule for access somewhere, though that does seem unlikely. Also, it would be nice if we can get rid of all duplicate constraints before going into the unification stage, also for a more succinct trace. I've tried to check before adding but didn't work yet for some reason.
Merging #339 (82bbaa1) into develop (28b4109) will increase coverage by
0.18%
. The diff coverage is95.23%
.
@@ Coverage Diff @@
## develop #339 +/- ##
===========================================
+ Coverage 86.39% 86.57% +0.18%
===========================================
Files 109 109
Lines 11649 11637 -12
===========================================
+ Hits 10064 10075 +11
+ Misses 1585 1562 -23
Relevant issues
Summary
Fix #297 by recursively for each inner call also generating a constraint.
An example
x.y.z
is turned into:'x'.y == 'x.y'
'x.y'.z == 'x.y.z'
Then in the unifcation stage:
'x'.y
is a direct access so one can take the class ofx
, look at fieldy
, and determine the of expression'x.y'
.'x.y'
is in'x.y'.z
, so we lookupz
in whatever type'x.y'
is to know the type ofx.y.z
.Added Tests