Skip to content

Commit a901b25

Browse files
committed
Removed redundant comments
1 parent 8c06f71 commit a901b25

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

compiler/src/dotty/tools/dotc/transform/init/Objects.scala

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,37 +1173,10 @@ class Objects(using Context @constructorOnly):
11731173

11741174
case v @ SafeValue(_) =>
11751175
if v.typeSymbol != defn.NullClass then
1176-
// call on Null is sensible on AST level but not in practice
1176+
// selection on Null is sensible on AST level but not in practice
11771177
report.warning("[Internal error] Unexpected selection on safe value " + v.show + ", field = " + field.show + ". " + Trace.show, Trace.position)
11781178
end if
11791179
Bottom
1180-
// case v @ SafeValue(_) =>
1181-
// if v.typeSymbol == defn.NullClass then
1182-
// // call on Null is sensible on AST level but not in practice
1183-
// Bottom
1184-
// else if field.is(Flags.Method) then
1185-
// // Assume such method is pure. Check return type, only try to analyze body if return type is not safe
1186-
// val target = resolve(v.typeSymbol.asClass, field)
1187-
// val targetInfo = target.info
1188-
1189-
// val returnType = targetInfo match {
1190-
// case tpe: MethodicType => tpe.resType
1191-
// case _ =>
1192-
// report.warning("[Internal error] Unexpected selection on safe value " + v.show + ", field = " + field.show + " with type " + targetInfo.show + ". " + Trace.show, Trace.position)
1193-
// Bottom
1194-
// }
1195-
1196-
// val typeSymbol = SafeValue.getSafeTypeSymbol(returnType)
1197-
// if typeSymbol.isDefined then
1198-
// // since method is pure and return type is safe, no need to analyze method body
1199-
// SafeValue(typeSymbol.get)
1200-
// else if !target.hasSource then
1201-
// UnknownValue
1202-
// else
1203-
// call(v, target, args = Nil, receiver = receiver, superType = NoType, needResolve = false)
1204-
// else
1205-
// report.warning("[Internal error] Unexpected selection of a non-method on safe value " + v.show + ", field = " + field.show + ". " + Trace.show, Trace.position)
1206-
// Bottom
12071180

12081181
case Package(packageModuleClass) =>
12091182
if field.isStaticObject then

0 commit comments

Comments
 (0)