[tests, dart2js] Make test conditional on dart2js mode

Change-Id: Ibc1a99b4ad95e3df3b6fd85715cd8f0218235771
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332300
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This commit is contained in:
Stephen Adams 2023-10-26 17:18:28 +00:00 committed by Commit Queue
parent 56a17a3e85
commit 163bd370a0

View file

@ -44,6 +44,8 @@ void loop(A<String> obj, bool violateType) {
}
void main() {
if (dart2jsProductionMode) return; // All checks omitted in this mode.
A<num>().field = 10;
final obj = A<String>();
loop(obj, false);