@@ -798,6 +798,10 @@ object Objects:
798
798
report.warning(" [Internal error] unexpected tree in selecting a function, fun = " + fun.code.show + Trace .show, fun.code)
799
799
Bottom
800
800
801
+ case arr : OfArray =>
802
+ report.warning(" [Internal error] unexpected tree in selecting an array, array = " + arr.show + Trace .show, Trace .position)
803
+ Bottom
804
+
801
805
case Bottom =>
802
806
if field.isStaticObject then ObjectRef (field.moduleClass.asClass)
803
807
else Bottom
@@ -818,6 +822,9 @@ object Objects:
818
822
case fun : Fun =>
819
823
report.warning(" [Internal error] unexpected tree in assignment, fun = " + fun.code.show + Trace .show, Trace .position)
820
824
825
+ case arr : OfArray =>
826
+ report.warning(" [Internal error] unexpected tree in assignment, array = " + arr.show + Trace .show, Trace .position)
827
+
821
828
case Cold =>
822
829
report.warning(" Assigning to cold aliases is forbidden. Calling trace:\n " + Trace .show, Trace .position)
823
830
@@ -854,7 +861,7 @@ object Objects:
854
861
report.warning(" [Internal error] unexpected outer in instantiating a class, outer = " + outer.show + " , class = " + klass.show + " , " + Trace .show, Trace .position)
855
862
Bottom
856
863
857
- case _ : Ref | _ : Cold .type | _ : Bottom .type =>
864
+ case outer : ( Ref | Cold .type | Bottom .type ) =>
858
865
if klass == defn.ArrayClass then
859
866
val arr = OfArray (State .currentObject, summon[Regions .Data ])
860
867
Heap .write(arr.addr, Bottom )
@@ -930,7 +937,7 @@ object Objects:
930
937
case Cold =>
931
938
report.warning(" Calling cold by-name alias. Call trace: \n " + Trace .show, Trace .position)
932
939
Bottom
933
- case _ : ValueSet | _ : Ref =>
940
+ case _ : ValueSet | _ : Ref | _ : OfArray =>
934
941
report.warning(" [Internal error] Unexpected by-name value " + value.show + " . Calling trace:\n " + Trace .show, Trace .position)
935
942
Bottom
936
943
else
0 commit comments