File tree 1 file changed +2
-2
lines changed
compiler/src/dotty/tools/dotc/transform/init
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1141,7 +1141,7 @@ object Semantic:
1141
1141
val obj = warm.objekt
1142
1142
val outer = obj.outer(klass)
1143
1143
val ctor = klass.primaryConstructor
1144
- val hotSegmentCountered = ! ctor.hasSource || outer.isHot && {
1144
+ val isHotSegment = outer.isHot && {
1145
1145
val ctorDef = ctor.defTree.asInstanceOf [DefDef ]
1146
1146
val params = ctorDef.termParamss.flatten.map(_.symbol)
1147
1147
// We have cached all parameters on the object
@@ -1151,7 +1151,7 @@ object Semantic:
1151
1151
// If the outer and parameters of a class are all hot, then accessing fields and methods of the current
1152
1152
// segment of the object should be OK. They may only create problems via virtual method calls on `this`, but
1153
1153
// those methods are checked as part of the check for the class where they are defined.
1154
- if ! hotSegmentCountered then
1154
+ if ! isHotSegment then
1155
1155
for member <- klass.info.decls do
1156
1156
if ! member.isType && ! member.isConstructor && member.hasSource && ! member.is(Flags .Deferred ) then
1157
1157
if member.is(Flags .Method , butNot = Flags .Accessor ) then
You can’t perform that action at this time.
0 commit comments