-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:metaprogramming:quotesIssues related to quotes and splicesIssues related to quotes and splicesbetter-errorsIssues concerned with improving confusing/unhelpful diagnostic messagesIssues concerned with improving confusing/unhelpful diagnostic messagesitype:enhancement
Milestone
Description
Compiler version
3.5.1
Minimized code
import scala.quoted.{Expr, Quotes, Type}
case class Thing[T](vs: List[String])
class BugDemo {
object TASTyLowering {
override protected def deserialize[T](expr: Expr[List[String]])(
using
qt: Quotes
): Expr[Thing[T]] = {
val tt = Type.of[T](
using
qt
)
'{ Thing[T]($expr) }
}
}
}
Output
/home/peng/git/dottyspike/src/main/scala/com/tribbloids/spike/dotty/quoted/autolift/spike/BugDemo.scala:16:24
Reference to T within quotes requires a given scala.quoted.Type[T] in scope.
val tt = Type.of[T](
/home/peng/git/dottyspike/src/main/scala/com/tribbloids/spike/dotty/quoted/autolift/spike/BugDemo.scala:21:16
Reference to T within quotes requires a given scala.quoted.Type[T] in scope.
'{ Thing[T]($expr) }
the signature of Type.of[T]
is:
/** Return a quoted.Type with the given type */
@compileTimeOnly("Reference to `scala.quoted.Type.of` was not handled by PickleQuotes")
given of[T <: AnyKind](using Quotes): Type[T] = ???
so clearly something is wrong here
Expectation
both summoning should succeed
Metadata
Metadata
Assignees
Labels
area:metaprogramming:quotesIssues related to quotes and splicesIssues related to quotes and splicesbetter-errorsIssues concerned with improving confusing/unhelpful diagnostic messagesIssues concerned with improving confusing/unhelpful diagnostic messagesitype:enhancement