Skip to content

Check that we don't leak uninstantiated type variables #4084

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

Merged
merged 1 commit into from
Mar 26, 2018

Conversation

smarter
Copy link
Member

@smarter smarter commented Mar 8, 2018

Type variable instantiation should only occur in Typer, TreeChecker and
during exhaustiveness checking, this means that no uninstantiated type
variable should exist outside of these phases. This was not enforced
until now, and was not always true before #4080.

@smarter
Copy link
Member Author

smarter commented Mar 8, 2018

test performance please

@dottybot
Copy link
Member

dottybot commented Mar 8, 2018

performance test scheduled: 1 job(s) in queue, 1 running.

@smarter smarter requested a review from odersky March 8, 2018 13:25
@dottybot
Copy link
Member

dottybot commented Mar 8, 2018

Performance test finished successfully:

Visit http://dotty-bench.epfl.ch/4084/ to see the changes.

Benchmarks is based on merging with master (e531634)

@odersky
Copy link
Contributor

odersky commented Mar 9, 2018

I don't think we need to test that explicitly since uninstantiated type variables cause anyway failures in both Pickler and -Ycheck. I found so far that this was sufficient. If we do want the more precise functionality for debugging I would suggest putting this under a Config option.

@smarter
Copy link
Member Author

smarter commented Mar 9, 2018

I don't think we need to test that explicitly since uninstantiated type variables cause anyway failures in both Pickler and -Ycheck

Where is this checked in Ycheck? The failure cases I saw before happened with type variables instantiated after Typer but before Pickler.

@odersky
Copy link
Contributor

odersky commented Mar 12, 2018

If the problem was caused by Typer, I always got an error by turning -Ycheck:front on.

@smarter smarter force-pushed the check-tvar-instantiation branch from abc5010 to c3a3ec2 Compare March 20, 2018 19:27
@smarter
Copy link
Member Author

smarter commented Mar 23, 2018

I've replaced the content of this PR with a much simpler check in TreeChecker.

@smarter smarter assigned odersky and unassigned smarter Mar 23, 2018
@odersky odersky merged commit 8f069b0 into scala:master Mar 26, 2018
@allanrenucci allanrenucci deleted the check-tvar-instantiation branch March 26, 2018 15:35
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.

3 participants