@@ -246,17 +246,6 @@ class Definitions {
246246 * - Have other methods exist only in Object.
247247 * To achieve this, we synthesize all Any and Object methods; Object methods no longer get
248248 * loaded from a classfile.
249- *
250- * There's a remaining question about `getClass`. In Scala2.x `getClass` was handled by compiler magic.
251- * This is deemed too cumersome for Dotty and therefore right now `getClass` gets no special treatment;
252- * it's just a method on `Any` which returns the raw type `java.lang.Class`. An alternative
253- * way to get better `getClass` typing would be to treat `getClass` as a method of a generic
254- * decorator which gets remapped in a later phase to Object#getClass. Then we could give it
255- * the right type without changing the typechecker:
256- *
257- * implicit class AnyGetClass[T](val x: T) extends AnyVal {
258- * def getClass: java.lang.Class[T] = ???
259- * }
260249 */
261250 @ tu lazy val AnyClass : ClassSymbol = completeClass(enterCompleteClassSymbol(ScalaPackageClass , tpnme.Any , Abstract , Nil ), ensureCtor = false )
262251 def AnyType : TypeRef = AnyClass .typeRef
@@ -275,7 +264,7 @@ class Definitions {
275264 @ tu lazy val Any_typeCast : TermSymbol = enterT1ParameterlessMethod(AnyClass , nme.asInstanceOfPM, _.paramRefs(0 ), Final | Synthetic | Artifact | StableRealizable )
276265 // generated by pattern matcher, eliminated by erasure
277266
278- // def getClass[A >: this.type](): Class[? <: A]
267+ /** def getClass[A >: this.type](): Class[? <: A] */
279268 @ tu lazy val Any_getClass : TermSymbol =
280269 enterPolyMethod(
281270 AnyClass , nme.getClass_, 1 ,
0 commit comments