[test][wildcard-variables] Fix typedef record type.

This switch would've failed regardless. This CL switches the types of the typedef R so that this test would pass.

Bug: https://github.com/dart-lang/sdk/issues/55652
Change-Id: Ic36863a38e3197bd9012907caa9f445faf4945b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371021
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
This commit is contained in:
Kallen Tu 2024-06-12 18:43:39 +00:00 committed by Commit Queue
parent bbc9cb6d06
commit 0b31d88594

View file

@ -10,7 +10,7 @@ import 'dart:async';
import 'package:expect/expect.dart';
typedef R = (String _, String _);
typedef R = (int _, int _);
void main() {
(int _, int _) record;
@ -18,9 +18,9 @@ void main() {
Expect.equals(1, record.$1);
Expect.equals(2, record.$2);
R rType = ('1', '2');
Expect.equals('1', rType.$1);
Expect.equals('2', rType.$2);
R rType = (1, 2);
Expect.equals(1, rType.$1);
Expect.equals(2, rType.$2);
// Has a named field (which cannot be `_`).
(int _, int _, {int x}) recordX;