Skip to content

Commit 52a5bdb

Browse files
authored
Merge pull request #5118 from dotty-staging/tasty-string-tpe
Add String to tasty standard definitions
2 parents 0a2734b + 2d3218c commit 52a5bdb

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

compiler/src/dotty/tools/dotc/tastyreflect/StandardDefinitions.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,6 @@ trait StandardDefinitions extends scala.tasty.reflect.StandardDefinitions {
8080
def ObjectType: Type = defn.ObjectType
8181
def NothingType: Type = defn.NothingType
8282
def NullType: Type = defn.NullType
83+
def StringType: Type = defn.StringType
8384
}
8485
}

library/src/scala/tasty/reflect/StandardDefinitions.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,5 +212,8 @@ trait StandardDefinitions extends TastyCore {
212212

213213
/** The type of core type `Null`. */
214214
def NullType: Type
215+
216+
/** The type for `scala.String`. */
217+
def StringType: Type
215218
}
216219
}

tests/run/tasty-definitions-1.check

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,4 @@ Type.SymRef(<scala.AnyRef>, Type.ThisType(Type.SymRef(<scala>, NoPrefix())))
169169
Type.SymRef(<java.lang.Object>, Type.ThisType(Type.SymRef(<java.lang>, NoPrefix())))
170170
Type.SymRef(<scala.Nothing>, Type.ThisType(Type.SymRef(<scala>, NoPrefix())))
171171
Type.SymRef(<scala.Null>, Type.ThisType(Type.SymRef(<scala>, NoPrefix())))
172+
Type.SymRef(<java.lang.String>, Type.ThisType(Type.SymRef(<java.lang>, NoPrefix())))

tests/run/tasty-definitions-1/quoted_1.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ object Macros {
9191
printout(definitions.ObjectType.show)
9292
printout(definitions.NothingType.show)
9393
printout(definitions.NullType.show)
94+
printout(definitions.StringType.show)
9495

9596

9697
'(println(~buff.result().mkString("\n").toExpr))

0 commit comments

Comments
 (0)