Skip to content

Commit daa7505

Browse files
EnzeXingolhotak
andauthored
Apply suggestions from code review
Co-authored-by: Ondřej Lhoták <[email protected]>
1 parent f5efea1 commit daa7505

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ object Objects:
7171

7272
/** Syntax for the data structure abstraction used in abstract domain:
7373
*
74-
* ve ::= ObjectRef(class)
75-
* | OfClass(class, vs[outer], ctor, args, env)
74+
* ve ::= ObjectRef(class) // global object
75+
* | OfClass(class, vs[outer], ctor, args, env) // instance of a class
7676
* | OfArray(object[owner], regions)
7777
* | Fun(..., env) // value elements that can be contained in ValueSet
7878
* vs ::= ValueSet(ve) // set of abstract values
7979
* Bottom ::= ValueSet(Empty)
8080
* val ::= ve | Cold | vs // all possible abstract values in domain
81-
* Ref ::= ObjectRef | OfClass // values that represents a reference
81+
* Ref ::= ObjectRef | OfClass // values that represent a reference to some (global or instance) object
8282
* ThisValue ::= Ref | Cold // possible values for 'this'
8383
*
8484
* refMap = Ref -> ( valsMap, varsMap, outersMap ) // refMap stores field informations of an object or instance
@@ -877,7 +877,7 @@ object Objects:
877877
case thisV : (Ref | Cold.type) =>
878878
if klass.owner.isClass then
879879
if klass.owner.is(Flags.Package) then
880-
report.warning("top-level class should have `Bottom` as outer, class = " + klass.show + ", outer = " + outer.show + ", " + Trace.show, Trace.position)
880+
report.warning("[Internal error] top-level class should have `Bottom` as outer, class = " + klass.show + ", outer = " + outer.show + ", " + Trace.show, Trace.position)
881881
(Bottom, Env.NoEnv)
882882
else
883883
(thisV.widenRefOrCold(1), Env.NoEnv)

0 commit comments

Comments
 (0)