Skip to content

Commit

Permalink
#2641. Add more test cases to the existing wildcard tests (#2654)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrekhov committed May 10, 2024
1 parent ee1696f commit ced3940
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
11 changes: 10 additions & 1 deletion LanguageFeatures/Wildcards/binding_A01_t02.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// SharedOptions=--enable-experiment=wildcards

class C<T> {
C();
C.constructor1(int _) {
print(_);
// ^
Expand Down Expand Up @@ -48,6 +47,15 @@ class C<T> {
}
}

class D {
final int x;

const D(int _) : this.x = _;
// ^
// [analyzer] unspecified
// [cfe] unspecified
}

extension type ET<T>(int id) {
ET.constructor1(this.id, int _) {
print(_);
Expand Down Expand Up @@ -86,5 +94,6 @@ extension type ET<T>(int id) {

main() {
print(C);
print(D);
print(ET);
}
11 changes: 9 additions & 2 deletions LanguageFeatures/Wildcards/binding_A01_t05.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
/// scope by a wildcarded declaration. Test callable local variables.
/// @author sgrekhov22@gmail.com
// SharedOptions=--enable-experiment=wildcards

class C {}

test1() {
Expand All @@ -29,7 +27,16 @@ test2() {
// [cfe] unspecified
}

test3() {
void _() {}
_();
//^
// [analyzer] unspecified
// [cfe] unspecified
}

main() {
test1();
test2();
test3();
}

0 comments on commit ced3940

Please sign in to comment.