Skip to content

Commit 1936944

Browse files
committed
Add hook to make AnyKind support conditional
1 parent 6525787 commit 1936944

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compiler/src/dotty/tools/dotc/core/Definitions.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,11 @@ class Definitions {
304304
def ObjectMethods = List(Object_eq, Object_ne, Object_synchronized, Object_clone,
305305
Object_finalize, Object_notify, Object_notifyAll, Object_wait, Object_waitL, Object_waitLI)
306306

307-
lazy val AnyKindClass = completeClass(enterCompleteClassSymbol(ScalaPackageClass, tpnme.AnyKind, AbstractFinal, Nil))
307+
lazy val AnyKindClass = {
308+
val cls = ctx.newCompleteClassSymbol(ScalaPackageClass, tpnme.AnyKind, AbstractFinal | Permanent, Nil)
309+
if (true) cls.entered // TODO: replace with if (ctx.settings.Yanykind.value) ...
310+
cls
311+
}
308312
def AnyKindType = AnyKindClass.typeRef
309313

310314
/** Marker method to indicate an argument to a call-by-name parameter.

0 commit comments

Comments
 (0)