File tree Expand file tree Collapse file tree 7 files changed +76
-18
lines changed
pkg/analysis_server/lib/src/services/correction Expand file tree Collapse file tree 7 files changed +76
-18
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ vars = {
122122 "intl_rev" : "7e3a1bbdeff241323f56295d8991c004bef815e6" ,
123123 "jinja2_rev" : "2222b31554f03e62600cd7e383376a7c187967a1" ,
124124 "json_rpc_2_rev" : "805e6536dd961d66f6b8cd46d8f3e61774f957c9" ,
125- "linter_rev" : "a97919a064cc4b3b6923a18cdb47a3779a31bc7b " , # dev
125+ "linter_rev" : "304042aaa933a02d2581ab9598dd2ddaebdbc803 " , # dev
126126 "lints_rev" : "8294e5648ab49474541527e2911e72e4c5aefe55" ,
127127 "logging_rev" : "d10e24844c2e01d3f6d2b5a1a2bb8717359c6a87" ,
128128 "markdown_rev" : "e3f4bd28c9e61b522f75f291d4d6cfcfeccd83ee" , # b/236358256
Original file line number Diff line number Diff line change @@ -1940,6 +1940,8 @@ LintCode.unnecessary_this:
19401940 status : hasFix
19411941LintCode.unnecessary_to_list_in_spreads :
19421942 status : needsEvaluation
1943+ LintCode.unreachable_from_main :
1944+ status : needsEvaluation
19431945LintCode.unrelated_type_equality_checks :
19441946 status : needsEvaluation
19451947LintCode.unsafe_html_attribute :
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
2+ // for details. All rights reserved. Use of this source code is governed by a
3+ // BSD-style license that can be found in the LICENSE file.
4+
5+ class BadExtends extends Null {}
6+ // ^^^^
7+ // [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
8+ // ^
9+ // [cfe] 'Null' is restricted and can't be extended or implemented.
10+ // [cfe] The superclass, 'Null', has no unnamed constructor that takes no arguments.
11+ // ^
12+ // [cfe] 'Null' is restricted and can't be extended or implemented.
13+
14+ class BadImplements implements Null {}
15+ // ^^^^
16+ // [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
17+ // ^
18+ // [cfe] 'Null' is restricted and can't be extended or implemented.
19+ // ^
20+ // [cfe] 'Null' is restricted and can't be extended or implemented.
21+
22+ class BadMixin extends Object with Null {}
23+ // ^^^^
24+ // [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
25+ // ^
26+ // [cfe] 'Null' is restricted and can't be extended or implemented.
27+ // ^
28+ // [cfe] 'Null' is restricted and can't be extended or implemented.
29+
30+ class BadMixin2 = Object with Null ;
31+ // ^^^^
32+ // [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
33+ // ^
34+ // [cfe] 'Null' is restricted and can't be extended or implemented.
35+ // ^
36+ // [cfe] 'Null' is restricted and can't be extended or implemented.
Original file line number Diff line number Diff line change 77
88import "package:expect/expect.dart" ;
99
10- class BadInherit
11- extends Null // //# 01: compile-time error
12- implements Null // //# 02: compile-time error
13- extends Object with Null // //# 03: compile-time error
14- {}
15-
1610class EqualsNotCalled {
1711 int get hashCode => throw "And don't warn!" ;
1812 bool operator == (Object other) {
@@ -52,8 +46,6 @@ void main() {
5246}
5347
5448void test () {
55- new BadInherit (); // Make sure class is referenced.
56-
5749 void foo (var obj) {
5850 Expect .equals (null , obj);
5951 }
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
2+ // for details. All rights reserved. Use of this source code is governed by a
3+ // BSD-style license that can be found in the LICENSE file.
4+
5+ class BadExtends extends Null {}
6+ // ^^^^
7+ // [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
8+ // ^
9+ // [cfe] 'Null' is restricted and can't be extended or implemented.
10+ // [cfe] The superclass, 'Null', has no unnamed constructor that takes no arguments.
11+ // ^
12+ // [cfe] 'Null' is restricted and can't be extended or implemented.
13+
14+ class BadImplements implements Null {}
15+ // ^^^^
16+ // [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
17+ // ^
18+ // [cfe] 'Null' is restricted and can't be extended or implemented.
19+ // ^
20+ // [cfe] 'Null' is restricted and can't be extended or implemented.
21+
22+ class BadMixin extends Object with Null {}
23+ // ^^^^
24+ // [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
25+ // ^
26+ // [cfe] 'Null' is restricted and can't be extended or implemented.
27+ // ^
28+ // [cfe] 'Null' is restricted and can't be extended or implemented.
29+
30+ class BadMixin2 = Object with Null ;
31+ // ^^^^
32+ // [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
33+ // ^
34+ // [cfe] 'Null' is restricted and can't be extended or implemented.
35+ // ^
36+ // [cfe] 'Null' is restricted and can't be extended or implemented.
Original file line number Diff line number Diff line change 99
1010import "package:expect/expect.dart" ;
1111
12- class BadInherit
13- extends Null // //# 01: compile-time error
14- implements Null // //# 02: compile-time error
15- extends Object with Null // //# 03: compile-time error
16- {}
17-
1812class EqualsNotCalled {
1913 int get hashCode => throw "And don't warn!" ;
2014 bool operator == (Object other) {
@@ -54,8 +48,6 @@ void main() {
5448}
5549
5650void test () {
57- new BadInherit (); // Make sure class is referenced.
58-
5951 int foo (var obj) {
6052 Expect .equals (null , obj);
6153 }
Original file line number Diff line number Diff line change @@ -27,5 +27,5 @@ CHANNEL dev
2727MAJOR 2
2828MINOR 19
2929PATCH 0
30- PRERELEASE 92
30+ PRERELEASE 93
3131PRERELEASE_PATCH 0
You can’t perform that action at this time.
0 commit comments