File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
compiler/src/dotty/tools/dotc/transform/init Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -664,15 +664,15 @@ object Objects:
664
664
else
665
665
errorReadOtherStaticObject(State .currentObject, addr.owner)
666
666
Bottom
667
- else if ref.isObjectRef then
667
+ else if ref.isObjectRef && ref.klass.hasSource then
668
668
report.warning(" Access uninitialized field " + field.show + " . Call trace: " + Trace .show, Trace .position)
669
669
Bottom
670
670
else
671
671
// initialization error, reported by the initialization checker
672
672
Bottom
673
673
else if ref.hasVal(target) then
674
674
ref.valValue(target)
675
- else if ref.isObjectRef then
675
+ else if ref.isObjectRef && ref.klass.hasSource then
676
676
report.warning(" Access uninitialized field " + field.show + " . Call trace: " + Trace .show, Trace .position)
677
677
Bottom
678
678
else
You can’t perform that action at this time.
0 commit comments