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

Fix #4323: enter class type parameters in GADT bounds #4351

Closed
wants to merge 3 commits into from

Conversation

liufengyun
Copy link
Contributor

@liufengyun liufengyun commented Apr 20, 2018

Fix #4323: enter class type parameters in GADT bounds

@liufengyun
Copy link
Contributor Author

test performance please

@dottybot
Copy link
Member

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

@dottybot
Copy link
Member

Performance test finished successfully:

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

Benchmarks is based on merging with master (8feb596)

@liufengyun liufengyun changed the title [WIP] Fix #4323: enter class type parameters in GADT bounds Fix #4323: enter class type parameters in GADT bounds Apr 23, 2018
case IExpr(value: Int) extends Expr[Int]
case BExpr(value: Boolean) extends Expr[Boolean]

def join(other: Expr[T]): Expr[T] = (this, other) match {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a neg test where this.T is not other.T:

def join[A](other: Expr[A]): Expr[T] = ...

@smarter
Copy link
Member

smarter commented Apr 23, 2018

It'd be good to figure out why a test had to be moved to pos-deep-subtype, this often masks real bugs.

@Blaisorblade
Copy link
Contributor

In fact the standard library had to be moved to -Yno-deep-subtypes, which seems even more concerning? We already know GADT bounds can create subtyping loops (#4069), so I'm not sure how robust this can possibly be.

@smarter
Copy link
Member

smarter commented Apr 23, 2018

If this is the same kind of loop as #4069 then we should probably try to fix the underlying issue first (I can give it a go).

@liufengyun
Copy link
Contributor Author

For the test case tests/pos-deep-subtype/t5399.scala, I see following logs:

assertion failure for _ <:< c.T, frozen = true
assertion failure for _ <:< _, frozen = true
assertion failure for _ <:< c.T, frozen = true
assertion failure for _ <:< _, frozen = true
assertion failure for _ <:< c.T, frozen = true
assertion failure for _ <:< _, frozen = true
assertion failure for _ <:< c.T, frozen = true
assertion failure for _ <:< _, frozen = true
assertion failure for _ <:< c.T, frozen = true
assertion failure for _ <:< _, frozen = true
assertion failure for _ <:< c.T, frozen = true

@smarter I think it is the same subtyping loop, please go ahead.

@liufengyun
Copy link
Contributor Author

Close for now, maybe @AleksanderBG can have a look at the GADTMap refactoring.

@liufengyun liufengyun closed this Nov 26, 2018
@liufengyun liufengyun deleted the fix-4323 branch November 26, 2018 16:08
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.

5 participants