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