Work on https://github.com/dart-lang/sdk/issues/54002 revealed that the
test least_upper_bound_greatest_closure_1_test.dart contains 4 static
type expectations that are incorrect according to the definition of `UP`
and this CL corrects those expectations.
The updates associated with 54002 will change the behavior of the cfe
and the analyzer such that they have the correct expectations (they
currently succeed with the incorrect static type expectations, that is,
they need to be updated in order to compute `UP` correctly, but that
will occur as part of the update described in 54002, so we will
approve the test failures caused by this CL and refer to 54002).
Change-Id: Iec6ba253eea9f85efc8af67b372bd7f160145a22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337726
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Change-Id: I59d20c1b4c874fb24a67f15296654d54a0d0dc1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179541
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
language/least_upper_bound/least_upper_bound_function_test.dart would
succeed if in `f4` the type of `z` were any top type. The type actually
expected is `Object?`. This CL adds some extra steps to `f4` to ensure
that it rejects other top types.
Change-Id: Ie2d042d54e83bf3e9c9db0c432ca32e90c5bbc6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166850
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
The tests least_upper_bound_{futureor,function}_test.dart are corrected:
The expected least upper bound was changed in one case in each test,
because the case matches a rule earlier in the ruleset, so the new rules
are not used in these cases.
Change-Id: I1f5f303ccde10af6084771a90d92d81d636909d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166635
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
https://github.com/dart-lang/language/pull/1195 changes the UP function
such that it uses the greatest closure with bounded and promoted type
variables, and adjusts the catch-all rules about function types (used
with `Function(int)` and `String` and other "otherwise" cases).
This PR adds tests for the updated rules.
Change-Id: I793b85ceec76105d013c03e8d9bccdd187bb476f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166101
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Change-Id: Id1cffba25214323478af50a8ae539236377d53c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149047
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>