Skip to content
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
11 changes: 11 additions & 0 deletions tests/pos/i8581/Macro_1.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import scala.quoted.*

case class Position()
object Position {
implicit inline def here: Position = ${ genPosition }

private def genPosition(using Quotes): Expr[Position] = {
val lineNo: Int = quotes.reflect.Position.ofMacroExpansion.startLine
'{ Position() }
}
}
16 changes: 16 additions & 0 deletions tests/pos/i8581/Test_2.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import scala.concurrent.duration.FiniteDuration
import scala.language.implicitConversions
import scala.reflect.ClassTag

class AnyShouldWrapper[T]

class Test {
implicit def convertToAnyShouldWrapper[T](o: T)(implicit pos: Position): AnyShouldWrapper[T] = ???

def expectMsgType[T](implicit t: ClassTag[T]): T = ???
def expectMsgType[T](max: FiniteDuration)(implicit t: ClassTag[T]): T = ???

def test(): Unit = {
expectMsgType[Int]: AnyShouldWrapper[Int]
}
}
Loading