-
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 #15343 from dotty-staging/revert-14026
Attempt to revert 14026
- Loading branch information
Showing
14 changed files
with
100 additions
and
6 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 |
---|---|---|
|
@@ -84,3 +84,6 @@ i4176-gadt.scala | |
i13974a.scala | ||
|
||
java-inherited-type1 | ||
|
||
# avoidance bug | ||
i15174.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.
File renamed without changes.
File renamed without changes.
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,6 @@ | ||
object ImplNotFound: | ||
def main(args: Array[String]): Unit = | ||
val res: Seq[String | Int] = (??? : Seq[Int]).collect { | ||
case 1 => Seq("") | ||
case 2 => Seq(1) | ||
}.flatten |
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 @@ | ||
// This should be a neg test once level checking is re-enabled. | ||
|
||
trait E[F[_]] { | ||
type T | ||
val value: F[T] | ||
} | ||
|
||
object E { | ||
def apply[F[_], T1](value1: F[T1]) = new E[F] { | ||
type T = T1 | ||
val value = value1 | ||
} | ||
} | ||
|
||
val a: Option[E[Ordering]] = Option(E(Ordering[Int])) | ||
val _ = a.map(it => E(it.value)) // there should be an error here | ||
|
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,14 @@ | ||
def test() = { | ||
func(_ => Box(Seq.empty[String]) ) | ||
} | ||
|
||
def func[R0](to0: Unit => R0): Unit = ??? | ||
|
||
trait JsonFormat[T] | ||
object JsonFormat{ | ||
implicit def immSeqFormat: JsonFormat[Seq[String]] = ??? | ||
|
||
implicit def iterableFormat: JsonFormat[Iterable[String]] = ??? | ||
} | ||
|
||
case class Box[A1: JsonFormat](elem: A1) |
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,25 @@ | ||
sealed abstract class Free[S[_], A] { | ||
final def map[B](f: A => B): Free[S, B] = ??? | ||
final def flatMap[B](f: A => Free[S, B]): Free[S, B] = new Free[S, B] {} | ||
} | ||
|
||
trait Parameter[T] | ||
def namedDouble(name: String): Free[Parameter, Double] = ??? | ||
|
||
type Double2 = (Double, Double) | ||
type Double3 = (Double, Double, Double) | ||
val spec: Free[Parameter, Either[Double3, Double2]] = for { | ||
result <- | ||
if (???) { | ||
for { | ||
x <- namedDouble("X") | ||
y <- namedDouble("Y") | ||
z <- namedDouble("Z") | ||
} yield Left((x, y, z)) | ||
} else { | ||
for { | ||
x <- namedDouble("X") | ||
y <- namedDouble("Y") | ||
} yield Right((x, y)) | ||
} | ||
} yield result |