Skip to content

Instantly share code, notes, and snippets.

@mraleph
Created December 18, 2018 08:39
Show Gist options
  • Save mraleph/6ef45e561b37141dc3c5136db5e25f95 to your computer and use it in GitHub Desktop.
Save mraleph/6ef45e561b37141dc3c5136db5e25f95 to your computer and use it in GitHub Desktop.
diff --git a/runtime/tests/vm/dart/regress_33999_test.dart b/runtime/tests/vm/dart/regress_33999_test.dart
index 933d2e0bef..21c3930afd 100644
--- a/runtime/tests/vm/dart/regress_33999_test.dart
+++ b/runtime/tests/vm/dart/regress_33999_test.dart
@@ -8,12 +8,14 @@
// Class with two type parameters.
class A<U, T> {
- T field;
+ T field1;
+ List<T> field2;
}
// Class with a single type parameter
class B<T> {
- T field;
+ T field1;
+ List<T> field2;
}
var TRUE = true;
@@ -22,9 +24,11 @@ void foo(bool f) {
dynamic x = f ? new B<int>() : new A<String, int>();
if (f == TRUE) {
// Prevent constant folding by accessing a global
- x.field = 10;
+ x.field1 = 10;
+ x.field2 = <int>[];
} else {
- x.field = 10;
+ x.field1 = 10;
+ x.field2 = <int>[];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment