Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify the parameter checks for overrides. #829

Closed
wants to merge 3 commits into from

Conversation

cpovirk
Copy link

@cpovirk cpovirk commented Aug 6, 2024

DO NOT MERGE, probably.

See discussion from about
jspecify/jspecify-reference-checker#193 (comment)
onward.

This PR is a lazy way for me to run tests, since I don't trust myself to
find the right way to run them all locally.

DO NOT MERGE, probably.

See discussion from about
jspecify/jspecify-reference-checker#193 (comment)
onward.

This PR is a lazy way for me to run tests, since I don't trust myself to
find the right way to run them all locally.
@cpovirk
Copy link
Author

cpovirk commented Aug 7, 2024

For the record, for cpovirk@85c2470 (typeHierarchy.isSubtype(overriddenParams.get(i), overriderParams.get(i)); and nothing else), I'm seeing:

ERROR: internal error in type processor! method typeProcessOver() doesn't get called.

I might now test a variant of that.

@cpovirk
Copy link
Author

cpovirk commented Aug 7, 2024

OK, I see the same problem if I merely pass overriddenParams.get(i) to isSubtype instead of passing the result of applyCaptureConversion (i.e., if I keep that part of my original change but revert the removal of the testTypevarContainment check).

@cpovirk
Copy link
Author

cpovirk commented Aug 7, 2024

...and the same problem if I put the applyCaptureConversion call back but remove the testTypevarContainment check.

I'm sure it could be interesting to dig deeper, but I'm just going to take away from this that there's no code that became trivially removable somewhere along the way.

@cpovirk cpovirk closed this Aug 7, 2024
@cpovirk
Copy link
Author

cpovirk commented Aug 14, 2024

(#849 suggests that the errors I'm seeing may or may not actually have been caused by the changes I was testing. For my current purposes, that still means that the code is not "trivially removable." But maybe I'll revisit it someday, assuming my investigation in jspecify/jspecify#583 doesn't make the changes look like a non-starter.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant