From 8aa86087a6ab34382fe534efa32242d94a3c6da8 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Sat, 7 Dec 2024 00:10:41 +0000 Subject: [PATCH] [test] Porting VM tearoff tests to the hot reload test framework. One test crashes due to #59671 Change-Id: I685bab8a87171c619da5bd685bf75fffe9fa7f39 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/399322 Reviewed-by: Nate Biggs Commit-Queue: Mark Zhou --- .../tear_off_add_arguments/main.0.dart | 34 +++++++++++ .../tear_off_add_arguments/main.1.dart | 53 ++++++++++++++++++ .../tear_off_add_arguments2/main.0.dart | 33 +++++++++++ .../tear_off_add_arguments2/main.1.dart | 52 +++++++++++++++++ .../tear_off_class_identity/main.0.dart | 27 +++++++++ .../tear_off_class_identity/main.1.dart | 39 +++++++++++++ .../tear_off_instance_equality/main.0.dart | 29 ++++++++++ .../tear_off_instance_equality/main.1.dart | 47 ++++++++++++++++ .../tear_off_library_identity/main.0.dart | 24 ++++++++ .../tear_off_library_identity/main.1.dart | 36 ++++++++++++ .../hot_reload/tear_off_list_set/main.0.dart | 44 +++++++++++++++ .../hot_reload/tear_off_list_set/main.1.dart | 56 +++++++++++++++++++ .../main.0.dart | 21 +++++++ .../main.1.dart | 43 ++++++++++++++ tests/hot_reload/tear_off_remove/main.0.dart | 27 +++++++++ tests/hot_reload/tear_off_remove/main.1.dart | 44 +++++++++++++++ 16 files changed, 609 insertions(+) create mode 100644 tests/hot_reload/tear_off_add_arguments/main.0.dart create mode 100644 tests/hot_reload/tear_off_add_arguments/main.1.dart create mode 100644 tests/hot_reload/tear_off_add_arguments2/main.0.dart create mode 100644 tests/hot_reload/tear_off_add_arguments2/main.1.dart create mode 100644 tests/hot_reload/tear_off_class_identity/main.0.dart create mode 100644 tests/hot_reload/tear_off_class_identity/main.1.dart create mode 100644 tests/hot_reload/tear_off_instance_equality/main.0.dart create mode 100644 tests/hot_reload/tear_off_instance_equality/main.1.dart create mode 100644 tests/hot_reload/tear_off_library_identity/main.0.dart create mode 100644 tests/hot_reload/tear_off_library_identity/main.1.dart create mode 100644 tests/hot_reload/tear_off_list_set/main.0.dart create mode 100644 tests/hot_reload/tear_off_list_set/main.1.dart create mode 100644 tests/hot_reload/tear_off_parameter_count_mismatch/main.0.dart create mode 100644 tests/hot_reload/tear_off_parameter_count_mismatch/main.1.dart create mode 100644 tests/hot_reload/tear_off_remove/main.0.dart create mode 100644 tests/hot_reload/tear_off_remove/main.1.dart diff --git a/tests/hot_reload/tear_off_add_arguments/main.0.dart b/tests/hot_reload/tear_off_add_arguments/main.0.dart new file mode 100644 index 00000000000..6299256b1b4 --- /dev/null +++ b/tests/hot_reload/tear_off_add_arguments/main.0.dart @@ -0,0 +1,34 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/f34a2ed99fc1b34cedbd974a5801f8d922121126/runtime/vm/isolate_reload_test.cc#L1867 + +invoke(f, a) { + return f(a); +} + +var f, r1, r2; + +class C { + foo(x) => x; +} + +helper() { + var c = C(); + f = c.foo; + r1 = invoke(f, 1); +} + +Future main() async { + helper(); + await hotReload(); + Expect.throws( + helper, + (err) => '$err'.contains("Class 'C' has no instance method " + "'foo' with matching arguments.")); +} diff --git a/tests/hot_reload/tear_off_add_arguments/main.1.dart b/tests/hot_reload/tear_off_add_arguments/main.1.dart new file mode 100644 index 00000000000..2029fc8890b --- /dev/null +++ b/tests/hot_reload/tear_off_add_arguments/main.1.dart @@ -0,0 +1,53 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/f34a2ed99fc1b34cedbd974a5801f8d922121126/runtime/vm/isolate_reload_test.cc#L1867 + +invoke(f, a) { + return f(a); +} + +var f, r1, r2; + +class C { + foo(x, y, z) => x + y + z; +} + +helper() { + r2 = invoke(f, 1); + return '$r1 $r2'; +} + +Future main() async { + helper(); + await hotReload(); + Expect.throws( + helper, + (err) => '$err'.contains("Class 'C' has no instance method " + "'foo' with matching arguments.")); +} +/** DIFF **/ +/* +@@ -15,13 +15,12 @@ + var f, r1, r2; + + class C { +- foo(x) => x; ++ foo(x, y, z) => x + y + z; + } + + helper() { +- var c = C(); +- f = c.foo; +- r1 = invoke(f, 1); ++ r2 = invoke(f, 1); ++ return '$r1 $r2'; + } + + Future main() async { +*/ diff --git a/tests/hot_reload/tear_off_add_arguments2/main.0.dart b/tests/hot_reload/tear_off_add_arguments2/main.0.dart new file mode 100644 index 00000000000..8c81487dcf0 --- /dev/null +++ b/tests/hot_reload/tear_off_add_arguments2/main.0.dart @@ -0,0 +1,33 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/f34a2ed99fc1b34cedbd974a5801f8d922121126/runtime/vm/isolate_reload_test.cc#L1924 + +invoke(f, a) { + return f(a); +} + +var f, r1, r2; + +class C { + static foo(x) => x; +} + +helper() { + f = C.foo; + r1 = invoke(f, 1); +} + +Future main() async { + helper(); + await hotReload(); + Expect.throws( + helper, + (err) => '$err'.contains("Closure call with mismatched arguments: " + "function 'C.foo'")); +} diff --git a/tests/hot_reload/tear_off_add_arguments2/main.1.dart b/tests/hot_reload/tear_off_add_arguments2/main.1.dart new file mode 100644 index 00000000000..3e38aff820e --- /dev/null +++ b/tests/hot_reload/tear_off_add_arguments2/main.1.dart @@ -0,0 +1,52 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/f34a2ed99fc1b34cedbd974a5801f8d922121126/runtime/vm/isolate_reload_test.cc#L1924 + +invoke(f, a) { + return f(a); +} + +var f, r1, r2; + +class C { + static foo(x, y, z) => x + y + z; +} + +helper() { + r2 = invoke(f, 1); + return '$r1 $r2'; +} + +Future main() async { + helper(); + await hotReload(); + Expect.throws( + helper, + (err) => '$err'.contains("Closure call with mismatched arguments: " + "function 'C.foo'")); +} +/** DIFF **/ +/* +@@ -15,12 +15,12 @@ + var f, r1, r2; + + class C { +- static foo(x) => x; ++ static foo(x, y, z) => x + y + z; + } + + helper() { +- f = C.foo; +- r1 = invoke(f, 1); ++ r2 = invoke(f, 1); ++ return '$r1 $r2'; + } + + Future main() async { +*/ diff --git a/tests/hot_reload/tear_off_class_identity/main.0.dart b/tests/hot_reload/tear_off_class_identity/main.0.dart new file mode 100644 index 00000000000..298fdf038e3 --- /dev/null +++ b/tests/hot_reload/tear_off_class_identity/main.0.dart @@ -0,0 +1,27 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/f34a2ed99fc1b34cedbd974a5801f8d922121126/runtime/vm/isolate_reload_test.cc#L1732 + +class C { + static foo() => 'old'; +} + +var f1, f2; +getFoo() => C.foo; + +Future main() async { + var f1 = getFoo(); + await hotReload(); + + var f2 = getFoo(); + Expect.equals('new', f1()); + Expect.equals('new', f2()); + Expect.equals(f1, f2); + Expect.identical(f1, f2); +} diff --git a/tests/hot_reload/tear_off_class_identity/main.1.dart b/tests/hot_reload/tear_off_class_identity/main.1.dart new file mode 100644 index 00000000000..1b0d235458d --- /dev/null +++ b/tests/hot_reload/tear_off_class_identity/main.1.dart @@ -0,0 +1,39 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/f34a2ed99fc1b34cedbd974a5801f8d922121126/runtime/vm/isolate_reload_test.cc#L1732 + +class C { + static foo() => 'new'; +} + +var f1, f2; +getFoo() => C.foo; + +Future main() async { + var f1 = getFoo(); + await hotReload(); + + var f2 = getFoo(); + Expect.equals('new', f1()); + Expect.equals('new', f2()); + Expect.equals(f1, f2); + Expect.identical(f1, f2); +} +/** DIFF **/ +/* +@@ -9,7 +9,7 @@ + // https://github.com/dart-lang/sdk/blob/f34a2ed99fc1b34cedbd974a5801f8d922121126/runtime/vm/isolate_reload_test.cc#L1732 + + class C { +- static foo() => 'old'; ++ static foo() => 'new'; + } + + var f1, f2; +*/ diff --git a/tests/hot_reload/tear_off_instance_equality/main.0.dart b/tests/hot_reload/tear_off_instance_equality/main.0.dart new file mode 100644 index 00000000000..034947b7469 --- /dev/null +++ b/tests/hot_reload/tear_off_instance_equality/main.0.dart @@ -0,0 +1,29 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/f34a2ed99fc1b34cedbd974a5801f8d922121126/runtime/vm/isolate_reload_test.cc#L1618 + +class C { + foo() => 'old'; +} + +var c, f1, f2; +helper() { + c = new C(); + f1 = c.foo; +} + +Future main() async { + helper(); + await hotReload(); + helper(); + Expect.equals('new', f1()); + Expect.equals('new', f2()); + Expect.equals(f1, f2); + Expect.notIdentical(f1, f2); +} diff --git a/tests/hot_reload/tear_off_instance_equality/main.1.dart b/tests/hot_reload/tear_off_instance_equality/main.1.dart new file mode 100644 index 00000000000..21f260d718b --- /dev/null +++ b/tests/hot_reload/tear_off_instance_equality/main.1.dart @@ -0,0 +1,47 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/f34a2ed99fc1b34cedbd974a5801f8d922121126/runtime/vm/isolate_reload_test.cc#L1618 + +class C { + foo() => 'new'; +} + +var c, f1, f2; +helper() { + f2 = c.foo; +} + +Future main() async { + helper(); + await hotReload(); + helper(); + Expect.equals('new', f1()); + Expect.equals('new', f2()); + Expect.equals(f1, f2); + Expect.notIdentical(f1, f2); +} +/** DIFF **/ +/* +@@ -9,13 +9,12 @@ + // https://github.com/dart-lang/sdk/blob/f34a2ed99fc1b34cedbd974a5801f8d922121126/runtime/vm/isolate_reload_test.cc#L1618 + + class C { +- foo() => 'old'; ++ foo() => 'new'; + } + + var c, f1, f2; + helper() { +- c = new C(); +- f1 = c.foo; ++ f2 = c.foo; + } + + Future main() async { +*/ diff --git a/tests/hot_reload/tear_off_library_identity/main.0.dart b/tests/hot_reload/tear_off_library_identity/main.0.dart new file mode 100644 index 00000000000..8cf338399d9 --- /dev/null +++ b/tests/hot_reload/tear_off_library_identity/main.0.dart @@ -0,0 +1,24 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/f34a2ed99fc1b34cedbd974a5801f8d922121126/runtime/vm/isolate_reload_test.cc#L1770 + +var f1, f2; +foo() => 'old'; +getFoo() => foo; + +Future main() async { + var f1 = getFoo(); + await hotReload(); + + var f2 = getFoo(); + Expect.equals('new', f1()); + Expect.equals('new', f2()); + Expect.equals(f1, f2); + Expect.identical(f1, f2); +} diff --git a/tests/hot_reload/tear_off_library_identity/main.1.dart b/tests/hot_reload/tear_off_library_identity/main.1.dart new file mode 100644 index 00000000000..747f0c29623 --- /dev/null +++ b/tests/hot_reload/tear_off_library_identity/main.1.dart @@ -0,0 +1,36 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/f34a2ed99fc1b34cedbd974a5801f8d922121126/runtime/vm/isolate_reload_test.cc#L1770 + +var f1, f2; +foo() => 'new'; +getFoo() => foo; + +Future main() async { + var f1 = getFoo(); + await hotReload(); + + var f2 = getFoo(); + Expect.equals('new', f1()); + Expect.equals('new', f2()); + Expect.equals(f1, f2); + Expect.identical(f1, f2); +} +/** DIFF **/ +/* +@@ -9,7 +9,7 @@ + // https://github.com/dart-lang/sdk/blob/f34a2ed99fc1b34cedbd974a5801f8d922121126/runtime/vm/isolate_reload_test.cc#L1770 + + var f1, f2; +-foo() => 'old'; ++foo() => 'new'; + getFoo() => foo; + + Future main() async { +*/ diff --git a/tests/hot_reload/tear_off_list_set/main.0.dart b/tests/hot_reload/tear_off_list_set/main.0.dart new file mode 100644 index 00000000000..aebfa1dc3cb --- /dev/null +++ b/tests/hot_reload/tear_off_list_set/main.0.dart @@ -0,0 +1,44 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/f34a2ed99fc1b34cedbd974a5801f8d922121126/runtime/vm/isolate_reload_test.cc#L1804 + +class C { + foo() => 'old'; +} + +List list = List.filled(2, null); +Set set = Set(); + +Future main() async { + var c = C(); + list[0] = c.foo; + list[1] = c.foo; + set.add(c.foo); + set.add(c.foo); + int countBefore = set.length; + await hotReload(); + + list[1] = c.foo; + set.add(c.foo); + set.add(c.foo); + int countAfter = set.length; + + Expect.equals('new', list[0]()); + Expect.equals('new', list[1]()); + Expect.equals(list[0], list[1]); + Expect.notIdentical(list[0], list[1]); + Expect.equals(1, countBefore); + Expect.equals(1, countAfter); + Expect.equals('new', (set.first)()); + Expect.equals(set.first, c.foo); + Expect.equals(set.first, c.foo); + Expect.notIdentical(set.first, c.foo); + set.remove(c.foo); + Expect.isEmpty(set); +} diff --git a/tests/hot_reload/tear_off_list_set/main.1.dart b/tests/hot_reload/tear_off_list_set/main.1.dart new file mode 100644 index 00000000000..2e8ff3e5f4a --- /dev/null +++ b/tests/hot_reload/tear_off_list_set/main.1.dart @@ -0,0 +1,56 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/f34a2ed99fc1b34cedbd974a5801f8d922121126/runtime/vm/isolate_reload_test.cc#L1804 + +class C { + foo() => 'new'; +} + +List list = List.filled(2, null); +Set set = Set(); + +Future main() async { + var c = C(); + list[0] = c.foo; + list[1] = c.foo; + set.add(c.foo); + set.add(c.foo); + int countBefore = set.length; + await hotReload(); + + list[1] = c.foo; + set.add(c.foo); + set.add(c.foo); + int countAfter = set.length; + + Expect.equals('new', list[0]()); + Expect.equals('new', list[1]()); + Expect.equals(list[0], list[1]); + Expect.notIdentical(list[0], list[1]); + Expect.equals(1, countBefore); + Expect.equals(1, countAfter); + Expect.equals('new', (set.first)()); + Expect.equals(set.first, c.foo); + Expect.equals(set.first, c.foo); + Expect.notIdentical(set.first, c.foo); + set.remove(c.foo); + Expect.isEmpty(set); +} +/** DIFF **/ +/* +@@ -9,7 +9,7 @@ + // https://github.com/dart-lang/sdk/blob/f34a2ed99fc1b34cedbd974a5801f8d922121126/runtime/vm/isolate_reload_test.cc#L1804 + + class C { +- foo() => 'old'; ++ foo() => 'new'; + } + + List list = List.filled(2, null); +*/ diff --git a/tests/hot_reload/tear_off_parameter_count_mismatch/main.0.dart b/tests/hot_reload/tear_off_parameter_count_mismatch/main.0.dart new file mode 100644 index 00000000000..f7ff01ded48 --- /dev/null +++ b/tests/hot_reload/tear_off_parameter_count_mismatch/main.0.dart @@ -0,0 +1,21 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/f34a2ed99fc1b34cedbd974a5801f8d922121126/runtime/vm/isolate_reload_test.cc#L1656 + +class C { + static foo() => 'old'; +} + +var f1 = C.foo; +helper() {} + +Future main() async { + await hotReload(); + Expect.throws(helper); +} diff --git a/tests/hot_reload/tear_off_parameter_count_mismatch/main.1.dart b/tests/hot_reload/tear_off_parameter_count_mismatch/main.1.dart new file mode 100644 index 00000000000..b2de8244084 --- /dev/null +++ b/tests/hot_reload/tear_off_parameter_count_mismatch/main.1.dart @@ -0,0 +1,43 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/f34a2ed99fc1b34cedbd974a5801f8d922121126/runtime/vm/isolate_reload_test.cc#L1656 + +class C { + static foo(i) => 'new:$i'; +} + +var f1; +helper() { + f1(); +} + +Future main() async { + await hotReload(); + Expect.throws(helper); +} +/** DIFF **/ +/* +@@ -9,11 +9,13 @@ + // https://github.com/dart-lang/sdk/blob/f34a2ed99fc1b34cedbd974a5801f8d922121126/runtime/vm/isolate_reload_test.cc#L1656 + + class C { +- static foo() => 'old'; ++ static foo(i) => 'new:$i'; + } + +-var f1 = C.foo; +-helper() {} ++var f1; ++helper() { ++ f1(); ++} + + Future main() async { + await hotReload(); +*/ diff --git a/tests/hot_reload/tear_off_remove/main.0.dart b/tests/hot_reload/tear_off_remove/main.0.dart new file mode 100644 index 00000000000..2a0c6896423 --- /dev/null +++ b/tests/hot_reload/tear_off_remove/main.0.dart @@ -0,0 +1,27 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/f34a2ed99fc1b34cedbd974a5801f8d922121126/runtime/vm/isolate_reload_test.cc#L1693 + +class C { + static foo({String bar = 'bar'}) => 'old'; +} + +var f1; +helper() { + f1 = C.foo; +} + +Future main() async { + helper(); + await hotReload(); + Expect.throws( + helper, + (err) => + '$err'.contains("No static method 'foo' declared in class 'C'.")); +} diff --git a/tests/hot_reload/tear_off_remove/main.1.dart b/tests/hot_reload/tear_off_remove/main.1.dart new file mode 100644 index 00000000000..7918b339211 --- /dev/null +++ b/tests/hot_reload/tear_off_remove/main.1.dart @@ -0,0 +1,44 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/f34a2ed99fc1b34cedbd974a5801f8d922121126/runtime/vm/isolate_reload_test.cc#L1693 + +class C {} + +var f1; +helper() { + f1(); +} + +Future main() async { + helper(); + await hotReload(); + Expect.throws( + helper, + (err) => + '$err'.contains("No static method 'foo' declared in class 'C'.")); +} +/** DIFF **/ +/* +@@ -8,13 +8,11 @@ + // Adapted from: + // https://github.com/dart-lang/sdk/blob/f34a2ed99fc1b34cedbd974a5801f8d922121126/runtime/vm/isolate_reload_test.cc#L1693 + +-class C { +- static foo({String bar = 'bar'}) => 'old'; +-} ++class C {} + + var f1; + helper() { +- f1 = C.foo; ++ f1(); + } + + Future main() async { +*/