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

#2145. Update existing "Evaluation of Implicit Variable Getters" tests #3052

Merged
merged 3 commits into from
Jan 27, 2025

Conversation

sgrekhov
Copy link
Contributor

  • Update assertions
  • Rename
  • Remove duplicated tests
  • Add test cases for mixins, enums, extesions and extension types

@sgrekhov sgrekhov marked this pull request as draft January 24, 2025 13:09
@sgrekhov sgrekhov marked this pull request as ready for review January 24, 2025 13:48
@sgrekhov
Copy link
Contributor Author

Updated according to the dart-lang/sdk#59945 (comment). Please review.

Copy link
Member

@eernstg eernstg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! One description may not have been updated?

/// of `id` is a late-initialized getter. This determines the semantics of an
/// invocation.
///
/// @description Checks that it is not an error if during an evaluation of the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo:

Suggested change
/// @description Checks that it is not an error if during an evaluation of the
/// @description Checks that it is an error if during an evaluation of the

This is actually a case which is covered by dart-lang/sdk#50383, and the rule is even stronger than the description here: It is enough that, for example, the declaration of sVar has an initializing expression that contains a reference to sVar, the evaluation of the initializing expression doesn't have to need that value (which is in fact the case here, because func doesn't invoke its argument).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the error expectations below are fine, but the description could be strengthened to say that a circular dependency is an error even when it is only syntactic, and there's no actual infinite loop during evaluation.

Copy link
Member

@eernstg eernstg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eernstg eernstg merged commit 1d760c1 into dart-lang:master Jan 27, 2025
2 checks passed
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Jan 31, 2025
2025-01-29 [email protected] dart-lang/co19#3054. Add covariant parameters tests (dart-lang/co19#3059)
2025-01-29 [email protected] dart-lang/co19#3054. Existing tests renamed to Instance Method Closurization (dart-lang/co19#3058)
2025-01-27 [email protected] dart-lang/co19#2162. Add static member and non-redirecting factory constructor conflict test (dart-lang/co19#3056)
2025-01-27 [email protected] dart-lang/co19#2145. Update existing "Evaluation of Implicit Variable Getters" tests (dart-lang/co19#3052)
2025-01-24 [email protected] dart-lang/co19#2138. Add more tests for `call` method/getter (dart-lang/co19#3053)
2025-01-24 [email protected] dart-lang/co19#2162. Add more constructor vs. static member conflict tests (dart-lang/co19#3055)
2025-01-17 [email protected] dart-lang/co19#2976. Add more tests for nullable and FutureOr types (dart-lang/co19#3050)

Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try
Change-Id: Ibeafe23be5d8b913db4e83b23f3820cafc3802ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406940
Reviewed-by: Erik Ernst <[email protected]>
Reviewed-by: Alexander Thomas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants