diff --git a/compiler/src/dotty/tools/dotc/tastyreflect/StandardDefinitions.scala b/compiler/src/dotty/tools/dotc/tastyreflect/StandardDefinitions.scala index 00cc6df81ddb..5d148b11d700 100644 --- a/compiler/src/dotty/tools/dotc/tastyreflect/StandardDefinitions.scala +++ b/compiler/src/dotty/tools/dotc/tastyreflect/StandardDefinitions.scala @@ -80,5 +80,6 @@ trait StandardDefinitions extends scala.tasty.reflect.StandardDefinitions { def ObjectType: Type = defn.ObjectType def NothingType: Type = defn.NothingType def NullType: Type = defn.NullType + def StringType: Type = defn.StringType } } diff --git a/library/src/scala/tasty/reflect/StandardDefinitions.scala b/library/src/scala/tasty/reflect/StandardDefinitions.scala index 6426cf9f8324..e707e36da58f 100644 --- a/library/src/scala/tasty/reflect/StandardDefinitions.scala +++ b/library/src/scala/tasty/reflect/StandardDefinitions.scala @@ -212,5 +212,8 @@ trait StandardDefinitions extends TastyCore { /** The type of core type `Null`. */ def NullType: Type + + /** The type for `scala.String`. */ + def StringType: Type } } diff --git a/tests/run/tasty-definitions-1.check b/tests/run/tasty-definitions-1.check index 266244b87d91..507aab21d794 100644 --- a/tests/run/tasty-definitions-1.check +++ b/tests/run/tasty-definitions-1.check @@ -169,3 +169,4 @@ Type.SymRef(, Type.ThisType(Type.SymRef(, NoPrefix()))) Type.SymRef(, Type.ThisType(Type.SymRef(, NoPrefix()))) Type.SymRef(, Type.ThisType(Type.SymRef(, NoPrefix()))) Type.SymRef(, Type.ThisType(Type.SymRef(, NoPrefix()))) +Type.SymRef(, Type.ThisType(Type.SymRef(, NoPrefix()))) diff --git a/tests/run/tasty-definitions-1/quoted_1.scala b/tests/run/tasty-definitions-1/quoted_1.scala index 9f9d0f8e2ce3..f134666dcd03 100644 --- a/tests/run/tasty-definitions-1/quoted_1.scala +++ b/tests/run/tasty-definitions-1/quoted_1.scala @@ -91,6 +91,7 @@ object Macros { printout(definitions.ObjectType.show) printout(definitions.NothingType.show) printout(definitions.NullType.show) + printout(definitions.StringType.show) '(println(~buff.result().mkString("\n").toExpr))