Skip to content

Add regression tests #20177

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

Merged
merged 1 commit into from
Apr 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions tests/pos/i16208.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

class Ann(x: Any) extends annotation.Annotation
object Message:
implicit def toNoExplanation(str: String): Message @Ann(str) = ???
class Message

object report:
def error(x: Message): Unit = ???

def test =
report.error("a") // works
report.error("a".stripMargin) // was an error
15 changes: 15 additions & 0 deletions tests/pos/i19749.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import scala.deriving.Mirror

case class A(x: Int, y: String)

trait SomeTrait[T]

object SomeTrait:
given [T]: SomeTrait[T] with {}

def f1[T](using p: Mirror.ProductOf[T]): Tuple.Elem[p.MirroredElemTypes, 0] = ???

def f2[T, R](f: T => R)(using SomeTrait[R]) = ???

// Scala3.3 is fine, 3.4 has compilation errors, p MirroredElemTypes type is missing and has been changed to Nothing
val x = f2(_ => f1[A])
Loading