@@ -150,13 +150,7 @@ mixin _IntListMixin implements List<int> {
150150 return - 1 ;
151151 }
152152
153- List <int > operator + (List <int > other) {
154- int totalLength = this .length + other.length;
155- return < int > []
156- ..length = totalLength
157- ..setRange (0 , this .length, this )
158- ..setRange (this .length, totalLength, other);
159- }
153+ List <int > operator + (List <int > other) => [...this , ...other];
160154
161155 bool contains (Object ? element) {
162156 var len = this .length;
@@ -506,13 +500,7 @@ mixin _DoubleListMixin implements List<double> {
506500 return - 1 ;
507501 }
508502
509- List <double > operator + (List <double > other) {
510- int totalLength = this .length + other.length;
511- return < double > []
512- ..length = totalLength
513- ..setRange (0 , this .length, this )
514- ..setRange (this .length, totalLength, other);
515- }
503+ List <double > operator + (List <double > other) => [...this , ...other];
516504
517505 bool contains (Object ? element) {
518506 var len = this .length;
@@ -868,13 +856,7 @@ abstract class _Float32x4ListMixin implements List<Float32x4> {
868856 return - 1 ;
869857 }
870858
871- List <Float32x4 > operator + (List <Float32x4 > other) {
872- int totalLength = this .length + other.length;
873- return < Float32x4 > []
874- ..length = totalLength
875- ..setRange (0 , this .length, this )
876- ..setRange (this .length, totalLength, other);
877- }
859+ List <Float32x4 > operator + (List <Float32x4 > other) => [...this , ...other];
878860
879861 bool contains (Object ? element) {
880862 var len = this .length;
@@ -1228,13 +1210,7 @@ abstract class _Int32x4ListMixin implements List<Int32x4> {
12281210 return - 1 ;
12291211 }
12301212
1231- List <Int32x4 > operator + (List <Int32x4 > other) {
1232- int totalLength = this .length + other.length;
1233- return < Int32x4 > []
1234- ..length = totalLength
1235- ..setRange (0 , this .length, this )
1236- ..setRange (this .length, totalLength, other);
1237- }
1213+ List <Int32x4 > operator + (List <Int32x4 > other) => [...this , ...other];
12381214
12391215 bool contains (Object ? element) {
12401216 var len = this .length;
@@ -1587,13 +1563,7 @@ abstract class _Float64x2ListMixin implements List<Float64x2> {
15871563 return - 1 ;
15881564 }
15891565
1590- List <Float64x2 > operator + (List <Float64x2 > other) {
1591- int totalLength = this .length + other.length;
1592- return < Float64x2 > []
1593- ..length = totalLength
1594- ..setRange (0 , this .length, this )
1595- ..setRange (this .length, totalLength, other);
1596- }
1566+ List <Float64x2 > operator + (List <Float64x2 > other) => [...this , ...other];
15971567
15981568 bool contains (Object ? element) {
15991569 var len = this .length;
0 commit comments