Skip to content

Commit 8b36a47

Browse files
authored
Merge pull request #7665 from dotty-staging/remove-backticked-names
Remove back-ticked names and add docs
2 parents 79df0a3 + 953b733 commit 8b36a47

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,9 +1137,9 @@ class ReflectionCompilerInterface(val rootContext: core.Contexts.Context) extend
11371137
}
11381138
else ctx.getClassIfDefined(clazz.getCanonicalName).typeRef
11391139

1140-
def `Type_=:=`(self: Type)(that: Type)(given Context): Boolean = self =:= that
1140+
def Type_isTypeEq(self: Type)(that: Type)(given Context): Boolean = self =:= that
11411141

1142-
def `Type_<:<`(self: Type)(that: Type)(given Context): Boolean = self <:< that
1142+
def Type_isSubType(self: Type)(that: Type)(given Context): Boolean = self <:< that
11431143

11441144
/** Widen from singleton type to its underlying non-singleton
11451145
* base type by applying one or more `underlying` dereferences,

library/src/scala/tasty/reflect/CompilerInterface.scala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -791,8 +791,13 @@ trait CompilerInterface {
791791

792792
def Type_apply(clazz: Class[_])(given ctx: Context): Type
793793

794-
def `Type_=:=`(self: Type)(that: Type)(given ctx: Context): Boolean
795-
def `Type_<:<`(self: Type)(that: Type)(given ctx: Context): Boolean
794+
/** Is `self` type the same as `that` type?
795+
* This is the case iff `Type_isSubType(self, that)` and `Type_isSubType(that, self)`.
796+
*/
797+
def Type_isTypeEq(self: Type)(that: Type)(given ctx: Context): Boolean
798+
799+
/** Is this type a subtype of that type? */
800+
def Type_isSubType(self: Type)(that: Type)(given ctx: Context): Boolean
796801

797802
/** Widen from singleton type to its underlying non-singleton
798803
* base type by applying one or more `underlying` dereferences,

library/src/scala/tasty/reflect/TypeOrBoundsOps.scala

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,15 @@ trait TypeOrBoundsOps extends Core {
88
def typeOf[T: scala.quoted.Type]: Type
99

1010
given TypeOps: (self: Type) {
11-
def =:=(that: Type)(given ctx: Context): Boolean = internal.`Type_=:=`(self)(that)
12-
def <:<(that: Type)(given ctx: Context): Boolean = internal.`Type_<:<`(self)(that)
11+
12+
/** Is `self` type the same as `that` type?
13+
* This is the case iff `self <:< that` and `that <:< self`.
14+
*/
15+
def =:=(that: Type)(given ctx: Context): Boolean = internal.Type_isTypeEq(self)(that)
16+
17+
/** Is this type a subtype of that type? */
18+
def <:<(that: Type)(given ctx: Context): Boolean = internal.Type_isSubType(self)(that)
19+
1320
def widen(given ctx: Context): Type = internal.Type_widen(self)
1421

1522
/** Follow aliases and dereferences LazyRefs, annotated types and instantiated

0 commit comments

Comments
 (0)