-
Notifications
You must be signed in to change notification settings - Fork 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 #12000 from dotty-staging/fix-11995
Revert "Recursively check nonvariant arguments of base types for realizability"
- Loading branch information
Showing
3 changed files
with
28 additions
and
60 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 was deleted.
Oops, something went wrong.
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,18 @@ | ||
trait MyBase[A]{ | ||
def foo: String | ||
} | ||
|
||
case class BothThing[L, R]() extends MyBase[L & R]: | ||
def foo: String = "blather" | ||
|
||
trait Has[A] | ||
|
||
trait Console | ||
trait Clock | ||
|
||
type ConsoleWithClock = Has[Console] with Has[Clock] | ||
|
||
class Spec[R <: Has[_]] | ||
|
||
object MySpec1 extends Spec[Has[Console] with Has[Clock]] // does not compile | ||
object MySpec2 extends Spec[ConsoleWithClock] // okay |