@@ -410,9 +410,6 @@ class Rti {
410410// TODO(nshahan): Make private and change the argument type to rti once this
411411// method is no longer called from outside the library.
412412Rti getLegacyErasedRti (Object ? rti) {
413- // When preserving the legacy stars in the runtime type no legacy erasure
414- // happens so the cached version cannot be used.
415- assert (! JS_GET_FLAG ('PRINT_LEGACY_STARS' ));
416413 var originalType = _Utils .asRti (rti);
417414 return Rti ._getCachedRuntimeType (originalType)? ._rti ??
418415 _createAndCacheRuntimeType (originalType)._rti;
@@ -1181,9 +1178,6 @@ _Type _createAndCacheRuntimeType(Rti rti) {
11811178}
11821179
11831180_Type _createRuntimeType (Rti rti) {
1184- if (JS_GET_FLAG ('PRINT_LEGACY_STARS' )) {
1185- return _Type (rti);
1186- }
11871181 String recipe = Rti ._getCanonicalRecipe (rti);
11881182 String starErasedRecipe = Rti .getLegacyErasedRecipe (rti);
11891183 if (starErasedRecipe == recipe) {
@@ -1996,16 +1990,7 @@ String _rtiToString(Rti rti, List<String>? genericContext) {
19961990 if (kind == Rti .kindStar) {
19971991 Rti starArgument = Rti ._getStarArgument (rti);
19981992 String s = _rtiToString (starArgument, genericContext);
1999- if (JS_GET_FLAG ('PRINT_LEGACY_STARS' )) {
2000- int argumentKind = Rti ._getKind (starArgument);
2001- if (argumentKind == Rti .kindFunction ||
2002- argumentKind == Rti .kindGenericFunction) {
2003- s = '(' + s + ')' ;
2004- }
2005- return s + '*' ;
2006- } else {
2007- return s;
2008- }
1993+ return s;
20091994 }
20101995
20111996 if (kind == Rti .kindQuestion) {
0 commit comments