-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6467 from dotty-staging/fix-#6385
Fix #6385: Don't instantiate hk type constructors too early
- Loading branch information
Showing
11 changed files
with
75 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
i94-nada.scala | ||
i1812.scala | ||
i1867.scala | ||
i3067.scala | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class Box[F[_]] | ||
|
||
class C[X] | ||
class D[X] extends C[String] | ||
|
||
object Test { | ||
def f[F[_]](x: Box[F]) = ??? | ||
def db: Box[D] = ??? | ||
def cb: Box[C] = db // error | ||
f[[X] => C[X]](db) // error | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
trait Higher[F[_]] | ||
trait Super[A] | ||
trait Sub[A] extends Super[A] | ||
|
||
object Test { | ||
implicit def higherSub: Higher[Sub] = ??? | ||
implicit def deriv[F[_]](implicit bla: Higher[F]): F[String] = ??? | ||
|
||
val x: Super[String] = deriv | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
trait Tc1[A] | ||
trait Tc2[A] extends Tc1[A] | ||
|
||
class PinTypeTo[K[_]] | ||
object PinTypeTo { | ||
implicit val pinType: PinTypeTo[Tc2] = new PinTypeTo[Tc2] | ||
} | ||
|
||
class X | ||
object X { | ||
implicit def Tc2Instance[F[x] >: Tc2[x]: PinTypeTo]: F[X] = new Tc2[X] {} | ||
} | ||
|
||
object app extends App { | ||
implicitly[Tc2[X]] | ||
implicitly[Tc1[X]] | ||
} |