dart-sdk/tests/language_2/language_2_dart2js.status
Alexander Markov 6239c434fb [vm,cfe] Avoid elimination of 'x as Function' type casts
Elimination of redundant type cast 'x as Function' where x is
a function type (such as 'void Function(int)') is not correct because
it changes semantics of a function call if such expression is
used as a receiver.

"Function" static type of receiver allows arbitrary function calls,
while known function type of the receiver means the call doesn't
need to check parameter types. Static type of receiver is currently
not stored in kernel AST but calculated from the receiver node,
so replacing 'x as Function' with 'x' changes static type of
the receiver from "Function" to function type.

TEST=tests/language/regress/regress45428_test.dart
Fixes https://github.com/dart-lang/sdk/issues/45428

Change-Id: If7148450526703daa63a442adf67a9e7a2dcea54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193524
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-03-31 15:57:29 +00:00

33 lines
1.6 KiB
Plaintext

# Copyright (c) 2017, 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.
# Sections in this file should contain "$compiler == dart2js".
[ $compiler == dart2js ]
external_abstract_fields/external_fields_test: SkipByDesign # Non-JS-interop external members are not supported
mixin_method_override_test/G5: Skip # Issue 34354
number/int64_literal_runtime*_test: Skip # This is testing Dart 2.0 int64 semantics
vm/*: SkipByDesign # Tests for the VM.
[ $compiler != dart2js ]
closure/minify_closure_variable_collision_test: SkipByDesign # Regression test for dart2js
[ $builder_tag == dart2js_production && $compiler == dart2js ]
control_flow_collections/for_non_bool_condition_test: Crash # Issue 36442
regress/regress45428_test: SkipByDesign # No argument type checks in production mode, issue 45528
[ $compiler == dart2js && $runtime == chromeOnAndroid ]
override_field_test/02: Slow, Pass # TODO(kasperl): Please triage.
[ $compiler == dart2js && $runtime == d8 ]
import/conditional_string_test: SkipByDesign # No XHR in d8
[ $compiler == dart2js && $runtime == jsshell ]
await/for_test: Skip # Jsshell does not provide periodic timers, Issue 7728
[ $compiler == dart2js && $system == windows ]
canonicalize/hashing_memoize_array_test: Skip # Issue 37631
canonicalize/hashing_memoize_instance_test: Skip # Issue 37631
canonicalize/hashing_shallow_collision_array_test: Skip # Issue 37631
canonicalize/hashing_shallow_collision_instance_test: Skip # Issue 37631