Skip to content

co19/LanguageFeatures/Constructor-tear-offs/type_literal_A01_t01 fails with RuntimeError #46893

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alexmarkov opened this issue Aug 12, 2021 · 0 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Comments

@alexmarkov
Copy link
Contributor

--- Command "vm" (took 326ms):
DART_CONFIGURATION=ReleaseX64 out/ReleaseX64/dart --sound-null-safety --enable-experiment=constructor-tearoffs --ignore-unrecognized-flags --packages=/b/s/w/ir/.packages /b/s/w/ir/tests/co19/src/LanguageFeatures/Constructor-tear-offs/type_literal_A01_t01.dart

exit code:
255

stderr:
Unhandled exception:
Expect.isTrue(false) fails.
#0      _fail (file:///b/s/w/ir/tests/co19/src/Utils/expect.dart:19:5)
#1      Expect.isTrue (file:///b/s/w/ir/tests/co19/src/Utils/expect_common.dart:38:5)
#2      main (file:///b/s/w/ir/tests/co19/src/LanguageFeatures/Constructor-tear-offs/type_literal_A01_t01.dart:28:10)
#3      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:283:19)
#4      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)

--- Re-run this test:
python3 tools/test.py -n dartk-strong-linux-release-x64 co19/LanguageFeatures/Constructor-tear-offs/type_literal_A01_t01

This test expects to find the same type from new List<int>.empty().runtimeType and from List<int> literal:

  Type intList = List<int>;
  List<int> list1 = new List<int>.empty();
  Expect.isTrue(list1.runtimeType == intList);

It could be failing because VM uses internal implementation classes (such as _List and _GrowableList) to implement lists, so runtime type could be different from List.

@alexmarkov alexmarkov added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label Aug 12, 2021
@alexmarkov alexmarkov self-assigned this Aug 12, 2021
dart-bot pushed a commit that referenced this issue Aug 13, 2021
…as List"

This reverts commit 824bec5.

Reason for revert: b/196606044

Original change's description:
> [vm] Hide internal implementation List types and expose them as List
>
> When taking a type of an instance with x.runtimeType we can map
> internal classes _List, _ImmutableList and _GrowableList to a
> user-visible List class. This is similar to what we do for
> implementation classes of int, String and Type.
> After that, result of x.runtimeType for built-in lists would be
> compatible with List<T> type literals.
>
> Also, both intrinsic and native implementations of _haveSameRuntimeType
> are updated to agree with new semantic of runtimeType.
>
> TEST=co19/LanguageFeatures/Constructor-tear-offs/type_literal_A01_t01
> TEST=runtime/tests/vm/dart/have_same_runtime_type_test
>
> Fixes #46893
> Issue #46231
>
> Change-Id: Ie24a9f527f66a06118427b7a09e49c03dff93d8e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210066
> Commit-Queue: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Tess Strickland <sstrickl@google.com>

TBR=rmacnak@google.com,alexmarkov@google.com,sstrickl@google.com

Change-Id: I4c3dddbc358d6ad3b14081706f7aec110a2e0562
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210200
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
@alexmarkov alexmarkov reopened this Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

1 participant