Skip to content

Avoid constraints of the wrong kind between TypeVars#6333

Closed
joroKr21 wants to merge 1 commit intoscala:2.13.xfrom
joroKr21:typevar-bounds
Closed

Avoid constraints of the wrong kind between TypeVars#6333
joroKr21 wants to merge 1 commit intoscala:2.13.xfrom
joroKr21:typevar-bounds

Conversation

@joroKr21
Copy link
Member

@joroKr21 joroKr21 commented Feb 17, 2018

When solving a list of type variables, bounds between them should
not be added as constraints when they are of different kinds.

Fixes scala/bug#8602 and fixes scala/bug#10722

@scala-jenkins scala-jenkins added this to the 2.13.0-M4 milestone Feb 17, 2018
@joroKr21
Copy link
Member Author

/sync

@milessabin
Copy link
Contributor

You might want to take a look at this earlier attempt of mine in the same general area: #6127.

I haven't had time to get it past WIP state.

@joroKr21
Copy link
Member Author

Ah, I missed that. Thanks for pointing it out.

Another problem with the type variable solver (or glb/lub, depending on your POV) is that the order of constraints matters (scala/bug#10740 and scala/bug#10686).

@milessabin
Copy link
Contributor

There are a lot of problems with the solver currently. I think it could do with a complete overhaul.

When solving a list of type variables, bounds between them should
not be added as constraints when they are of different kinds.

Fixes scala#8602 and fixes scala#10722
@joroKr21 joroKr21 mentioned this pull request Apr 5, 2018
@adriaanm
Copy link
Contributor

adriaanm commented Apr 5, 2018

Thanks! Incorporating tests in my follow-up PR, which also incorporates a variant of your fix.

@adriaanm adriaanm closed this Apr 5, 2018
@SethTisue SethTisue removed this from the 2.13.0-M4 milestone Apr 7, 2018
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.

Compiler crashes with "trying to do lub/glb of typevar" value class regression trying to do lub/glb of typevar

5 participants