Skip to content
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

Fix dynamic_prefix_core_test to reflect that dynamic is a member of dart:core #32060

Open
eernstg opened this issue Feb 6, 2018 · 1 comment
Labels
area-test Cross-cutting test issues (use area- labels for specific failures; not used for package:test).

Comments

@eernstg
Copy link
Member

eernstg commented Feb 6, 2018

This issue is concerned with the test tests/language_2/dynamic_prefix_core_test.dart: It should be updated such that it reflects the fact that dynamic is a member of 'dart:core'. It could be modified to be similar to the following:

// With an explicit import of 'dart:core', test that `dynamic` is
// treated as a member of that library.

import "package:expect/expect.dart";
import "dart:core" as mycore;

void main() {
  // `dynamic` is undefined.
  dynamic x; //# 01: compile-time error
  dynamic; //# 02: compile-time error

  // `mycore.dynamic` is the type we normally know as `dynamic`
  Expect.isTrue(mycore.dynamic is mycore.Type); //# 03: ok
  Expect.isTrue(<mycore.Object>[] is mycore.List<mycore.dynamic>); //# 04: ok
}

If we have policies against making any changes to tests/language at all then only the one in language_2 needs to be updated, otherwise tests/language/dynamic_prefix_core_test.dart should be modified similarly (if Dart 1 tests are being updated at all now).

Status entries should not refer to issue 12478 which says that dynamic is not exported by 'dart:core' and the test ought to work as-is (but the vm won't be updated accordingly because it is expected that the common front end will contain the update). I added a comment on 12478 saying that it is the test that needs to be updated, pointing to this issue.

Cf. #29125 for more details about the background.

@eernstg eernstg added the area-test Cross-cutting test issues (use area- labels for specific failures; not used for package:test). label Feb 6, 2018
@rmacnak-google
Copy link
Contributor

The mirrors implementations will also need to be updated to reflect this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-test Cross-cutting test issues (use area- labels for specific failures; not used for package:test).
Projects
None yet
Development

No branches or pull requests

2 participants