[dart2js] Don't produce '-2' for default type argument values with new RTI.

TBR=sra@google.com

Change-Id: I20ea2b530285090ef8fb4bbb025c632b74be994b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113759
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index af985cd..ab3bc02 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -6044,7 +6044,7 @@
       FunctionEntity function, TypeVariableType typeVariable) {
     DartType bound =
         _elementEnvironment.getTypeVariableDefaultType(typeVariable.element);
-    if (bound.containsTypeVariables) {
+    if (bound.containsTypeVariables && !options.experimentNewRti) {
       // TODO(33422): Support type variables in default
       // types. Temporarily using the "any" type (encoded as -2) to
       // avoid failing on bounds checks.