Closed SuzanneSoy closed 8 years ago
There have been a ton of optimizer/src loc issues in the past, and this looks like another one. And looks like all the other fixes we did. If you see correct coverage with that patch then its probably good enough!
@florence I've had a bit of trouble running a local version of typed/racket, so I might wait a bit before I try it out.
@jsmaniac we're in agreement this is TR bug right?
@florence Yes, the coverage is correct when using #lang racket
. I haven't really had the time to check if this patch (https://github.com/jsmaniac/typed-racket/tree/fix-coverage-vector-access) fixes the coverage, sorry. Should I submit a PR anyway?
Probably! Either way that would drop coverage eventually.
In the file above, the
vector-ref
identifier on the first line is marked as not covered (but not on the second). I believe this is because it gets expanded to the following code, where the syntax/loc isn't copied over tounsafe-vector-ref
andunsafe-vector*-ref
, as can be seen in the macro debugger.When the size is known, the code is instead:
There too, the
unsafe-vector-ref
identifier doesn't have the proper source location, but somehowcover
manages to mark it as covered.The problem occurs too with
vector-ref!
when the size isn't known.I made a patch for typed/racket to add the source location, but I'm not sure if that's enough: https://github.com/jsmaniac/typed-racket/tree/fix-coverage-vector-access . If you think that would solve the problem, I'll submit a pull request to typed/racket.