Version 2.17.0-124.0.dev
Merge commit '9ad6cc49afef4e1fedca524a972a003fba4397be' into 'dev'
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index e1ce95a..c4a2ee5 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -25675,9 +25675,11 @@
for (intptr_t j = inlined_functions.length() - 1; j >= 0; j--) {
const auto& inlined = *inlined_functions[j];
auto const pos = inlined_token_positions[j];
- PrintSymbolicStackFrame(zone, &buffer, inlined, pos, frame_index,
- /*is_line=*/FLAG_precompiled_mode);
- frame_index++;
+ if (FLAG_show_invisible_frames || inlined.is_visible()) {
+ PrintSymbolicStackFrame(zone, &buffer, inlined, pos, frame_index,
+ /*is_line=*/FLAG_precompiled_mode);
+ frame_index++;
+ }
}
continue;
}
diff --git a/tests/language/call/implicit_tearoff_error_test.dart b/tests/language/call/implicit_tearoff_error_test.dart
new file mode 100644
index 0000000..8010841
--- /dev/null
+++ b/tests/language/call/implicit_tearoff_error_test.dart
@@ -0,0 +1,35 @@
+// Copyright (c) 2022, 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.
+
+// This test exercises a corner case of implicit `.call` tearoffs that is
+// easiest to see through its effect on erroneous code.
+
+// NOTICE: This test checks the currently implemented behavior, even though the
+// implemented behavior does not match the language specification. Until an
+// official decision has been made about whether to change the implementation to
+// match the specification, or vice versa, this regression test is intended to
+// protect against inadvertent implementation changes.
+
+import '../static_type_helper.dart';
+
+class A {}
+
+class C extends A {
+ void call() {}
+}
+
+class D extends A {
+ void call() {}
+}
+
+void testConditionalExpressionWithUnrelatedClasses(bool b, C c, D d) {
+ // Verify that `b ? c : d` is not interpreted as `(b ? c.call : d.call)` by
+ // confirming that it's an error to use it in a function context (because
+ // `b ? c : d` has static type `A`).
+ context<void Function()>(b ? c : d);
+ // ^^^^^^^^^
+ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
+ // ^
+ // [cfe] The argument type 'A' can't be assigned to the parameter type 'void Function()'.
+}
diff --git a/tests/language_2/call/implicit_tearoff_error_test.dart b/tests/language_2/call/implicit_tearoff_error_test.dart
new file mode 100644
index 0000000..2de9347
--- /dev/null
+++ b/tests/language_2/call/implicit_tearoff_error_test.dart
@@ -0,0 +1,37 @@
+// Copyright (c) 2022, 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.
+
+// This test exercises a corner case of implicit `.call` tearoffs that is
+// easiest to see through its effect on erroneous code.
+
+// NOTICE: This test checks the currently implemented behavior, even though the
+// implemented behavior does not match the language specification. Until an
+// official decision has been made about whether to change the implementation to
+// match the specification, or vice versa, this regression test is intended to
+// protect against inadvertent implementation changes.
+
+// @dart = 2.9
+
+import '../static_type_helper.dart';
+
+class A {}
+
+class C extends A {
+ void call() {}
+}
+
+class D extends A {
+ void call() {}
+}
+
+void testConditionalExpressionWithUnrelatedClasses(bool b, C c, D d) {
+ // Verify that `b ? c : d` is not interpreted as `(b ? c.call : d.call)` by
+ // confirming that it's an error to use it in a function context (because
+ // `b ? c : d` has static type `A`).
+ context<void Function()>(b ? c : d);
+ // ^^^^^^^^^
+ // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
+ // ^
+ // [cfe] The argument type 'A' can't be assigned to the parameter type 'void Function()'.
+}
diff --git a/tools/VERSION b/tools/VERSION
index 9105ba2..e933701 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 17
PATCH 0
-PRERELEASE 123
+PRERELEASE 124
PRERELEASE_PATCH 0
\ No newline at end of file