Skip to content

Commit

Permalink
Fixes #2306. Fix promoted instance type in not_promotable_A01_t04.dart (
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrekhov authored Oct 13, 2023
1 parent e528e59 commit b29a0b9
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
/// @description Checks that an instance field is not promotable if it is
/// external
/// @author sgrekhov22@gmail.com
/// @issue 53426
class A {
void foo() {}
Expand All @@ -27,18 +26,18 @@ class C<T> {
void test() {
if (_x is A) {
_x.foo();
// ^^^^^
// ^^^
// [analyzer] unspecified
// [cfe] unspecified
}
}
}

main() {
C c = C();
C<Object> c = C<Object>();
if (c._x is A) {
c._x.foo();
// ^^^^^
// ^^^
// [analyzer] unspecified
// [cfe] unspecified
}
Expand Down

0 comments on commit b29a0b9

Please sign in to comment.