dart-sdk/tests
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
..
co19 [co19] remove skips is a status files motivated by language issue 115 2021-03-30 16:37:41 +00:00
co19_2 [co19] Obsolete entries removed from co19_2-kernel.status file according to co19 issue #1041 2021-03-31 04:14:42 +00:00
corelib
corelib_2
dartdevc
dartdevc_2 [cfe] Allow experiments only in current sdk version 2021-03-31 15:20:08 +00:00
ffi [analyzer/ffi] Inline array annotation const dimensions 2021-03-30 00:28:57 +00:00
ffi_2 [analyzer/ffi] Inline array annotation const dimensions 2021-03-30 00:28:57 +00:00
language [vm,cfe] Avoid elimination of 'x as Function' type casts 2021-03-31 15:57:29 +00:00
language_2 [vm,cfe] Avoid elimination of 'x as Function' type casts 2021-03-31 15:57:29 +00:00
lib [pkg:js] Filter promise_reject_null_test from CSP 2021-03-25 22:00:19 +00:00
lib_2 [pkg:js] Filter promise_reject_null_test from CSP 2021-03-25 22:00:19 +00:00
modular
standalone
standalone_2
web
web_2
legacy_status_dart2js.csv
README.md

This directory contains tests of the language and core library implementations. For more information, see https://github.com/dart-lang/sdk/wiki/Testing.