diff --git a/community-build/community-projects/dotty-cps-async b/community-build/community-projects/dotty-cps-async index 82c352728dbc..5c05911ede2b 160000 --- a/community-build/community-projects/dotty-cps-async +++ b/community-build/community-projects/dotty-cps-async @@ -1 +1 @@ -Subproject commit 82c352728dbcd66884c2cb02cfd7c69670eb794e +Subproject commit 5c05911ede2beb05424b8008b43dd0ead4ee2a14 diff --git a/library/src-bootstrapped/dotty/internal/StringContextMacro.scala b/library/src-bootstrapped/dotty/internal/StringContextMacro.scala index 23ccad6c7a5c..92ba70c39214 100644 --- a/library/src-bootstrapped/dotty/internal/StringContextMacro.scala +++ b/library/src-bootstrapped/dotty/internal/StringContextMacro.scala @@ -585,11 +585,11 @@ object StringContextMacro { * nothing otherwise */ def checkTypeWithArgs(argument : (Type, Int), conversionChar : Char, partIndex : Int, flags : List[(Char, Int)]) = { - val booleans = List(defn.BooleanType, defn.NullType) - val dates = List(defn.LongType, Type.of[java.util.Calendar], Type.of[java.util.Date]) - val floatingPoints = List(defn.DoubleType, defn.FloatType, Type.of[java.math.BigDecimal]) - val integral = List(defn.IntType, defn.LongType, defn.ShortType, defn.ByteType, Type.of[java.math.BigInteger]) - val character = List(defn.CharType, defn.ByteType, defn.ShortType, defn.IntType) + val booleans = List(Type.of[Boolean], Type.of[Null]) + val dates = List(Type.of[Long], Type.of[java.util.Calendar], Type.of[java.util.Date]) + val floatingPoints = List(Type.of[Double], Type.of[Float], Type.of[java.math.BigDecimal]) + val integral = List(Type.of[Int], Type.of[Long], Type.of[Short], Type.of[Byte], Type.of[java.math.BigInteger]) + val character = List(Type.of[Char], Type.of[Byte], Type.of[Short], Type.of[Int]) val (argType, argIndex) = argument conversionChar match { diff --git a/library/src-bootstrapped/scala/internal/quoted/Type.scala b/library/src-bootstrapped/scala/internal/quoted/Type.scala index 74477105cfa9..31b09209ea3d 100644 --- a/library/src-bootstrapped/scala/internal/quoted/Type.scala +++ b/library/src-bootstrapped/scala/internal/quoted/Type.scala @@ -47,30 +47,48 @@ object Type { } def Unit: QuoteContext ?=> quoted.Type[Unit] = - qctx.tasty.defn.UnitType.seal.asInstanceOf[quoted.Type[Unit]] + val qctx1 = quoteContextWithCompilerInterface(qctx) + qctx1.tasty.Definitions_UnitType.seal.asInstanceOf[quoted.Type[Unit]] + def Boolean: QuoteContext ?=> quoted.Type[Boolean] = - qctx.tasty.defn.BooleanType.seal.asInstanceOf[quoted.Type[Boolean]] + val qctx1 = quoteContextWithCompilerInterface(qctx) + qctx1.tasty.Definitions_BooleanType.seal.asInstanceOf[quoted.Type[Boolean]] + def Byte: QuoteContext ?=> quoted.Type[Byte] = - qctx.tasty.defn.ByteType.seal.asInstanceOf[quoted.Type[Byte]] + val qctx1 = quoteContextWithCompilerInterface(qctx) + qctx1.tasty.Definitions_ByteType.seal.asInstanceOf[quoted.Type[Byte]] + def Char: QuoteContext ?=> quoted.Type[Char] = - qctx.tasty.defn.CharType.seal.asInstanceOf[quoted.Type[Char]] + val qctx1 = quoteContextWithCompilerInterface(qctx) + qctx1.tasty.Definitions_CharType.seal.asInstanceOf[quoted.Type[Char]] + def Short: QuoteContext ?=> quoted.Type[Short] = - qctx.tasty.defn.ShortType.seal.asInstanceOf[quoted.Type[Short]] + val qctx1 = quoteContextWithCompilerInterface(qctx) + qctx1.tasty.Definitions_ShortType.seal.asInstanceOf[quoted.Type[Short]] + def Int: QuoteContext ?=> quoted.Type[Int] = - qctx.tasty.defn.IntType.seal.asInstanceOf[quoted.Type[Int]] + val qctx1 = quoteContextWithCompilerInterface(qctx) + qctx1.tasty.Definitions_IntType.seal.asInstanceOf[quoted.Type[Int]] + def Long: QuoteContext ?=> quoted.Type[Long] = - qctx.tasty.defn.LongType.seal.asInstanceOf[quoted.Type[Long]] + val qctx1 = quoteContextWithCompilerInterface(qctx) + qctx1.tasty.Definitions_LongType.seal.asInstanceOf[quoted.Type[Long]] + def Float: QuoteContext ?=> quoted.Type[Float] = - qctx.tasty.defn.FloatType.seal.asInstanceOf[quoted.Type[Float]] + val qctx1 = quoteContextWithCompilerInterface(qctx) + qctx1.tasty.Definitions_FloatType.seal.asInstanceOf[quoted.Type[Float]] + def Double: QuoteContext ?=> quoted.Type[Double] = - qctx.tasty.defn.DoubleType.seal.asInstanceOf[quoted.Type[Double]] + val qctx1 = quoteContextWithCompilerInterface(qctx) + qctx1.tasty.Definitions_DoubleType.seal.asInstanceOf[quoted.Type[Double]] + } diff --git a/library/src-bootstrapped/scala/quoted/util/ExprMap.scala b/library/src-bootstrapped/scala/quoted/util/ExprMap.scala index 73ee87903024..64be17340a9b 100644 --- a/library/src-bootstrapped/scala/quoted/util/ExprMap.scala +++ b/library/src-bootstrapped/scala/quoted/util/ExprMap.scala @@ -16,7 +16,7 @@ trait ExprMap { def localCtx(definition: Definition): Context = definition.symbol.localContext tree match { case tree: Term => - transformTerm(tree, defn.AnyType) + transformTerm(tree, Type.of[Any]) case tree: Definition => transformDefinition(tree) case tree: Import => @@ -53,9 +53,9 @@ trait ExprMap { tree case tree @ Apply(fun, args) => val MethodType(_, tpes, _) = fun.tpe.widen - Apply.copy(tree)(transformTerm(fun, defn.AnyType), transformTerms(args, tpes)) + Apply.copy(tree)(transformTerm(fun, Type.of[Any]), transformTerms(args, tpes)) case TypeApply(fun, args) => - TypeApply.copy(tree)(transformTerm(fun, defn.AnyType), args) + TypeApply.copy(tree)(transformTerm(fun, Type.of[Any]), args) case _: Literal => tree case New(tpt) => @@ -74,7 +74,7 @@ trait ExprMap { Block.copy(tree)(transformStats(stats), transformTerm(expr, tpe)) case If(cond, thenp, elsep) => If.copy(tree)( - transformTerm(cond, defn.BooleanType), + transformTerm(cond, Type.of[Boolean]), transformTerm(thenp, tpe), transformTerm(elsep, tpe)) case _: Closure => @@ -87,9 +87,9 @@ trait ExprMap { // Return.copy(tree)(transformTerm(expr, expr.tpe)) tree case While(cond, body) => - While.copy(tree)(transformTerm(cond, defn.BooleanType), transformTerm(body, defn.AnyType)) + While.copy(tree)(transformTerm(cond, Type.of[Boolean]), transformTerm(body, Type.of[Any])) case Try(block, cases, finalizer) => - Try.copy(tree)(transformTerm(block, tpe), transformCaseDefs(cases, defn.AnyType), finalizer.map(x => transformTerm(x, defn.AnyType))) + Try.copy(tree)(transformTerm(block, tpe), transformCaseDefs(cases, Type.of[Any]), finalizer.map(x => transformTerm(x, Type.of[Any]))) case Repeated(elems, elemtpt) => Repeated.copy(tree)(transformTerms(elems, elemtpt.tpe), elemtpt) case Inlined(call, bindings, expansion) => @@ -113,7 +113,7 @@ trait ExprMap { def transformTypeTree(tree: TypeTree)(using ctx: Context): TypeTree = tree def transformCaseDef(tree: CaseDef, tpe: Type)(using ctx: Context): CaseDef = - CaseDef.copy(tree)(tree.pattern, tree.guard.map(x => transformTerm(x, defn.BooleanType)), transformTerm(tree.rhs, tpe)) + CaseDef.copy(tree)(tree.pattern, tree.guard.map(x => transformTerm(x, Type.of[Boolean])), transformTerm(tree.rhs, tpe)) def transformTypeCaseDef(tree: TypeCaseDef)(using ctx: Context): TypeCaseDef = { TypeCaseDef.copy(tree)(transformTypeTree(tree.pattern), transformTypeTree(tree.rhs)) diff --git a/library/src/scala/tasty/Reflection.scala b/library/src/scala/tasty/Reflection.scala index 57dcc7587a38..97cbbf6206b9 100644 --- a/library/src/scala/tasty/Reflection.scala +++ b/library/src/scala/tasty/Reflection.scala @@ -2193,7 +2193,7 @@ trait Reflection extends reflect.Types { reflectSelf: CompilerInterface => /** A value containing all standard definitions in [[DefinitionsAPI]] * @group Definitions */ - object defn extends StandardSymbols with StandardTypes + object defn extends StandardSymbols /** Defines standard symbols (and types via its base trait). * @group API @@ -2366,71 +2366,6 @@ trait Reflection extends reflect.Types { reflectSelf: CompilerInterface => } - /** Defines standard types. - * @group Definitions - */ - trait StandardTypes { - /** The type of primitive type `Unit`. */ - def UnitType: Type = reflectSelf.Definitions_UnitType - - /** The type of primitive type `Byte`. */ - def ByteType: Type = reflectSelf.Definitions_ByteType - - /** The type of primitive type `Short`. */ - def ShortType: Type = reflectSelf.Definitions_ShortType - - /** The type of primitive type `Char`. */ - def CharType: Type = reflectSelf.Definitions_CharType - - /** The type of primitive type `Int`. */ - def IntType: Type = reflectSelf.Definitions_IntType - - /** The type of primitive type `Long`. */ - def LongType: Type = reflectSelf.Definitions_LongType - - /** The type of primitive type `Float`. */ - def FloatType: Type = reflectSelf.Definitions_FloatType - - /** The type of primitive type `Double`. */ - def DoubleType: Type = reflectSelf.Definitions_DoubleType - - /** The type of primitive type `Boolean`. */ - def BooleanType: Type = reflectSelf.Definitions_BooleanType - - /** The type of core type `Any`. */ - def AnyType: Type = reflectSelf.Definitions_AnyType - - /** The type of core type `AnyVal`. */ - def AnyValType: Type = reflectSelf.Definitions_AnyValType - - /** The type of core type `AnyRef`. */ - def AnyRefType: Type = reflectSelf.Definitions_AnyRefType - - /** The type of core type `Object`. */ - def ObjectType: Type = reflectSelf.Definitions_ObjectType - - /** The type of core type `Nothing`. */ - def NothingType: Type = reflectSelf.Definitions_NothingType - - /** The type of core type `Null`. */ - def NullType: Type = reflectSelf.Definitions_NullType - - /** The type for `scala.String`. */ - def StringType: Type = reflectSelf.Definitions_StringType - - /** The type for `scala.Tuple`. */ - def TupleType: Type = reflectSelf.Definitions_TupleType - - /** The type for `scala.EmptyTuple`. */ - def EmptyTupleType: Type = reflectSelf.Definitions_EmptyTupleType - - /** The type for `scala.NonEmptyTuple`. */ - def NonEmptyTupleType: Type = reflectSelf.Definitions_NonEmptyTupleType - - /** The type for `scala.*:`. */ - def TupleConsType: Type = reflectSelf.Definitions_TupleConsType - } - /////////////// // FLAGS // diff --git a/tests/pos-macros/i8879/Macro_1.scala b/tests/pos-macros/i8879/Macro_1.scala index 806464642e1f..6f018b321fbd 100644 --- a/tests/pos-macros/i8879/Macro_1.scala +++ b/tests/pos-macros/i8879/Macro_1.scala @@ -12,7 +12,7 @@ object Test { val foo = Type.of[Foo[String]] val symbol = foo.typeSymbol.field("a") val a = foo.select(symbol) - assert(a <:< defn.StringType) + assert(a <:< Type.of[String]) '{???} } diff --git a/tests/run-custom-args/tasty-interpreter/interpreter/TastyInterpreter.scala b/tests/run-custom-args/tasty-interpreter/interpreter/TastyInterpreter.scala index 13f82ced2970..14be31c6a83c 100644 --- a/tests/run-custom-args/tasty-interpreter/interpreter/TastyInterpreter.scala +++ b/tests/run-custom-args/tasty-interpreter/interpreter/TastyInterpreter.scala @@ -12,7 +12,7 @@ class TastyInterpreter extends TastyInspector { override def traverseTree(tree: Tree)(implicit ctx: Context): Unit = tree match { // TODO: check the correct sig and object enclosement for main case DefDef("main", _, _, _, Some(rhs)) => - val interpreter = new jvm.Interpreter(this.reflect) + val interpreter = new jvm.Interpreter interpreter.eval(rhs)(using Map.empty) // TODO: recurse only for PackageDef, ClassDef diff --git a/tests/run-custom-args/tasty-interpreter/interpreter/TreeInterpreter.scala b/tests/run-custom-args/tasty-interpreter/interpreter/TreeInterpreter.scala index 6965bd3b2f83..9eacc0f68061 100644 --- a/tests/run-custom-args/tasty-interpreter/interpreter/TreeInterpreter.scala +++ b/tests/run-custom-args/tasty-interpreter/interpreter/TreeInterpreter.scala @@ -1,10 +1,11 @@ package scala.tasty.interpreter +import scala.quoted._ import scala.tasty.interpreter.jvm.JVMReflection import scala.tasty.Reflection -abstract class TreeInterpreter[R <: Reflection & Singleton](val reflect: R) { - import reflect.{_, given _} +abstract class TreeInterpreter[QCtx <: QuoteContext & Singleton](using val qctx: QCtx) { + import qctx.tasty._ final val LOG = false @@ -196,15 +197,15 @@ abstract class TreeInterpreter[R <: Reflection & Singleton](val reflect: R) { isIntegralPrimitive(tpe) || isFractionalPrimitive(tpe) private def isIntegralPrimitive(tpe: Type): Boolean = { - tpe <:< defn.ByteType || - tpe <:< defn.CharType || - tpe <:< defn.ShortType || - tpe <:< defn.IntType || - tpe <:< defn.LongType + tpe <:< Type.of[Byte] || + tpe <:< Type.of[Char] || + tpe <:< Type.of[Short] || + tpe <:< Type.of[Int] || + tpe <:< Type.of[Long] } private def isFractionalPrimitive(tpe: Type): Boolean = - tpe <:< defn.FloatType || tpe <:< defn.DoubleType + tpe <:< Type.of[Float] || tpe <:< Type.of[Double] private object Call { diff --git a/tests/run-custom-args/tasty-interpreter/interpreter/jvm/Interpreter.scala b/tests/run-custom-args/tasty-interpreter/interpreter/jvm/Interpreter.scala index aa822ad7b73f..6a9cab103179 100644 --- a/tests/run-custom-args/tasty-interpreter/interpreter/jvm/Interpreter.scala +++ b/tests/run-custom-args/tasty-interpreter/interpreter/jvm/Interpreter.scala @@ -1,16 +1,17 @@ package scala.tasty.interpreter package jvm +import scala.quoted._ import scala.tasty.interpreter.jvm.JVMReflection import scala.tasty.Reflection -class Interpreter[R <: Reflection & Singleton](reflect0: R) extends TreeInterpreter[R](reflect0) { - import reflect.{_, given _} +class Interpreter[QCtx <: QuoteContext & Singleton](using qctx0: QCtx) extends TreeInterpreter[QCtx] { + import qctx.tasty._ // All references are represented by themselves and values are boxed type AbstractAny = Any - val jvmReflection = new JVMReflection(reflect) + val jvmReflection = new JVMReflection(using qctx) def interpretNew(fn: Tree, argss: List[List[Term]]): Result = { if (fn.symbol.isDefinedInCurrentRun) { diff --git a/tests/run-custom-args/tasty-interpreter/interpreter/jvm/JVMReflection.scala b/tests/run-custom-args/tasty-interpreter/interpreter/jvm/JVMReflection.scala index b38091b8c494..d13c7af410c9 100644 --- a/tests/run-custom-args/tasty-interpreter/interpreter/jvm/JVMReflection.scala +++ b/tests/run-custom-args/tasty-interpreter/interpreter/jvm/JVMReflection.scala @@ -1,9 +1,11 @@ package scala.tasty.interpreter.jvm +import scala.quoted._ import scala.tasty.Reflection -class JVMReflection[R <: Reflection & Singleton](val reflect: R) { - import reflect.{_, given _} +class JVMReflection[QCtx <: QuoteContext & Singleton](using val tasty: QCtx) { + import qctx.tasty._ + import java.lang.reflect.{InvocationTargetException, Method} private val classLoader: ClassLoader = getClass.getClassLoader diff --git a/tests/run-macros/f-interpolation-1/FQuote_1.scala b/tests/run-macros/f-interpolation-1/FQuote_1.scala index 730b7630b53e..8119bd2daabb 100644 --- a/tests/run-macros/f-interpolation-1/FQuote_1.scala +++ b/tests/run-macros/f-interpolation-1/FQuote_1.scala @@ -46,7 +46,7 @@ object FQuote { val Typed(Repeated(allArgs, _), _) = args.unseal.underlyingArgument for ((arg, part) <- allArgs.zip(parts.tail)) { - if (part.startsWith("%d") && !(arg.tpe <:< defn.IntType)) { + if (part.startsWith("%d") && !(arg.tpe <:< Type.of[Int])) { return '{s"`${${Expr(arg.show)}}` is not of type Int"} } diff --git a/tests/run-macros/refined-selectable-macro/Macro_1.scala b/tests/run-macros/refined-selectable-macro/Macro_1.scala index 9e6725651e99..1a1642b21644 100644 --- a/tests/run-macros/refined-selectable-macro/Macro_1.scala +++ b/tests/run-macros/refined-selectable-macro/Macro_1.scala @@ -64,11 +64,11 @@ object Macro { (seen + name, (name, info)) case _ => report.error("Tuple type was not explicit expected `(S, T)` where S is a singleton string", s) - (seen, ("", defn.AnyType)) + (seen, ("", Type.of[Any])) } } def rec(tpe: Type, seen: Set[String]): List[(String, Type)] = { - if tpe =:= defn.EmptyTupleType then Nil + if tpe =:= Type.of[EmptyTuple] then Nil else tpe match { // head *: tail case AppliedType(parent, List(head, tail: Type)) if isTupleCons(parent.typeSymbol) => diff --git a/tests/run-macros/tasty-definitions-1.check b/tests/run-macros/tasty-definitions-1.check index 9262395615d6..723d10321f1c 100644 --- a/tests/run-macros/tasty-definitions-1.check +++ b/tests/run-macros/tasty-definitions-1.check @@ -163,10 +163,10 @@ TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Long") TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Float") TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Double") TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Boolean") -TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Any") -TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "AnyVal") -TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "AnyRef") -TypeRef(ThisType(TypeRef(NoPrefix(), "lang")), "Object") -TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Nothing") -TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Null") -TypeRef(ThisType(TypeRef(NoPrefix(), "lang")), "String") +TypeRef(TermRef(ThisType(TypeRef(NoPrefix(), "")), "scala"), "Any") +TypeRef(TermRef(ThisType(TypeRef(NoPrefix(), "")), "scala"), "AnyVal") +TypeRef(TermRef(ThisType(TypeRef(NoPrefix(), "java")), "lang"), "Object") +TypeRef(TermRef(ThisType(TypeRef(NoPrefix(), "java")), "lang"), "Object") +TypeRef(TermRef(ThisType(TypeRef(NoPrefix(), "")), "scala"), "Nothing") +TypeRef(TermRef(ThisType(TypeRef(NoPrefix(), "")), "scala"), "Null") +TypeRef(TermRef(ThisType(TypeRef(NoPrefix(), "java")), "lang"), "String") diff --git a/tests/run-macros/tasty-definitions-1/quoted_1.scala b/tests/run-macros/tasty-definitions-1/quoted_1.scala index e743b732d028..ae65fa5f04da 100644 --- a/tests/run-macros/tasty-definitions-1/quoted_1.scala +++ b/tests/run-macros/tasty-definitions-1/quoted_1.scala @@ -74,21 +74,21 @@ object Macros { printout(defn.ScalaPrimitiveValueClasses.map(_.name).toString) printout(defn.ScalaNumericValueClasses.map(_.name).toString) - printout(defn.UnitType.showExtractors) - printout(defn.ByteType.showExtractors) - printout(defn.CharType.showExtractors) - printout(defn.IntType.showExtractors) - printout(defn.LongType.showExtractors) - printout(defn.FloatType.showExtractors) - printout(defn.DoubleType.showExtractors) - printout(defn.BooleanType.showExtractors) - printout(defn.AnyType.showExtractors) - printout(defn.AnyValType.showExtractors) - printout(defn.AnyRefType.showExtractors) - printout(defn.ObjectType.showExtractors) - printout(defn.NothingType.showExtractors) - printout(defn.NullType.showExtractors) - printout(defn.StringType.showExtractors) + printout(Type.of[Unit].showExtractors) + printout(Type.of[Byte].showExtractors) + printout(Type.of[Char].showExtractors) + printout(Type.of[Int].showExtractors) + printout(Type.of[Long].showExtractors) + printout(Type.of[Float].showExtractors) + printout(Type.of[Double].showExtractors) + printout(Type.of[Boolean].showExtractors) + printout(Type.of[Any].showExtractors) + printout(Type.of[AnyVal].showExtractors) + printout(Type.of[AnyRef].showExtractors) + printout(Type.of[Object].showExtractors) + printout(Type.of[Nothing].showExtractors) + printout(Type.of[Null].showExtractors) + printout(Type.of[String].showExtractors) '{println(${Expr(buff.result().mkString("\n"))})} diff --git a/tests/run-macros/tasty-typeof/Macro_1.scala b/tests/run-macros/tasty-typeof/Macro_1.scala index a362a0ee66ed..e45d4aa89c68 100644 --- a/tests/run-macros/tasty-typeof/Macro_1.scala +++ b/tests/run-macros/tasty-typeof/Macro_1.scala @@ -7,21 +7,21 @@ object Macros { private def testTypeOfImpl(using qctx: QuoteContext) : Expr[Unit] = { import qctx.tasty._ '{ - assert(${Expr(Type.of[Unit] =:= defn.UnitType)}, "Unit") - assert(${Expr(Type.of[Byte] =:= defn.ByteType)}, "Byte") - assert(${Expr(Type.of[Short] =:= defn.ShortType)}, "Short") - assert(${Expr(Type.of[Int] =:= defn.IntType)}, "Int") - assert(${Expr(Type.of[Long] =:= defn.LongType)}, "Long") - assert(${Expr(Type.of[Float] =:= defn.FloatType)}, "Float") - assert(${Expr(Type.of[Double] =:= defn.DoubleType)}, "Double") - assert(${Expr(Type.of[Char] =:= defn.CharType)}, "Char") - assert(${Expr(Type.of[String] =:= defn.StringType)}, "String") + assert(${Expr(Type.of[Unit] =:= Type.of[Unit])}, "Unit") + assert(${Expr(Type.of[Byte] =:= Type.of[Byte])}, "Byte") + assert(${Expr(Type.of[Short] =:= Type.of[Short])}, "Short") + assert(${Expr(Type.of[Int] =:= Type.of[Int])}, "Int") + assert(${Expr(Type.of[Long] =:= Type.of[Long])}, "Long") + assert(${Expr(Type.of[Float] =:= Type.of[Float])}, "Float") + assert(${Expr(Type.of[Double] =:= Type.of[Double])}, "Double") + assert(${Expr(Type.of[Char] =:= Type.of[Char])}, "Char") + assert(${Expr(Type.of[String] =:= Type.of[String])}, "String") - assert(${Expr(Type.of[Any] =:= defn.AnyType)}, "Any") - assert(${Expr(Type.of[AnyRef] =:= defn.AnyRefType)}, "AnyRef") - assert(${Expr(Type.of[AnyVal] =:= defn.AnyValType)}, "AnyVal") - assert(${Expr(Type.of[Object] =:= defn.ObjectType)}, "Object") - assert(${Expr(Type.of[Nothing] =:= defn.NothingType)}, "Nothing") + assert(${Expr(Type.of[Any] =:= Type.of[Any])}, "Any") + assert(${Expr(Type.of[AnyRef] =:= Type.of[AnyRef])}, "AnyRef") + assert(${Expr(Type.of[AnyVal] =:= Type.of[AnyVal])}, "AnyVal") + assert(${Expr(Type.of[Object] =:= Type.of[Object])}, "Object") + assert(${Expr(Type.of[Nothing] =:= Type.of[Nothing])}, "Nothing") println(${Expr(Type.of[List[Int]].show)}) println(${Expr(Type.of[Macros].show)})