File tree Expand file tree Collapse file tree 8 files changed +138
-1
lines changed Expand file tree Collapse file tree 8 files changed +138
-1
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,8 @@ class SourceExtensionBuilder extends ExtensionBuilderImpl {
106
106
Builder ? objectGetter = objectClassBuilder.lookupLocalMember (name);
107
107
Builder ? objectSetter =
108
108
objectClassBuilder.lookupLocalMember (name, setter: true );
109
- if (objectGetter != null || objectSetter != null ) {
109
+ if (objectGetter != null && ! objectGetter.isStatic ||
110
+ objectSetter != null && ! objectSetter.isStatic) {
110
111
addProblem (
111
112
templateExtensionMemberConflictsWithObjectMember
112
113
.withArguments (name),
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
+ extension HashAll on Iterable {
6
+ int hashAll () => 0 ;
7
+ }
8
+
9
+ extension HashAllList on List {
10
+ int hashAll () => 1 ;
11
+ }
12
+
13
+ void main () {
14
+ List l = [];
15
+ Iterable i = [];
16
+ print (l.hashAll ());
17
+ print (i.hashAll ());
18
+ }
Original file line number Diff line number Diff line change
1
+ extension HashAll on Iterable {
2
+ int hashAll() => 0;
3
+ }
4
+
5
+ extension HashAllList on List {
6
+ int hashAll() => 1;
7
+ }
8
+
9
+ void main() {}
Original file line number Diff line number Diff line change
1
+ extension HashAll on Iterable {
2
+ int hashAll() => 0;
3
+ }
4
+
5
+ extension HashAllList on List {
6
+ int hashAll() => 1;
7
+ }
8
+
9
+ void main() {}
Original file line number Diff line number Diff line change
1
+ library /*isNonNullableByDefault*/;
2
+ import self as self;
3
+ import "dart:core" as core;
4
+
5
+ extension HashAll on core::Iterable<dynamic> {
6
+ method hashAll = self::HashAll|hashAll;
7
+ tearoff hashAll = self::HashAll|get#hashAll;
8
+ }
9
+ extension HashAllList on core::List<dynamic> {
10
+ method hashAll = self::HashAllList|hashAll;
11
+ tearoff hashAll = self::HashAllList|get#hashAll;
12
+ }
13
+ static method HashAll|hashAll(lowered final core::Iterable<dynamic> #this) → core::int
14
+ return 0;
15
+ static method HashAll|get#hashAll(lowered final core::Iterable<dynamic> #this) → () → core::int
16
+ return () → core::int => self::HashAll|hashAll(#this);
17
+ static method HashAllList|hashAll(lowered final core::List<dynamic> #this) → core::int
18
+ return 1;
19
+ static method HashAllList|get#hashAll(lowered final core::List<dynamic> #this) → () → core::int
20
+ return () → core::int => self::HashAllList|hashAll(#this);
21
+ static method main() → void {
22
+ core::List<dynamic> l = <dynamic>[];
23
+ core::Iterable<dynamic> i = <dynamic>[];
24
+ core::print(self::HashAllList|hashAll(l));
25
+ core::print(self::HashAll|hashAll(i));
26
+ }
Original file line number Diff line number Diff line change
1
+ library /*isNonNullableByDefault*/;
2
+ import self as self;
3
+ import "dart:core" as core;
4
+
5
+ extension HashAll on core::Iterable<dynamic> {
6
+ method hashAll = self::HashAll|hashAll;
7
+ tearoff hashAll = self::HashAll|get#hashAll;
8
+ }
9
+ extension HashAllList on core::List<dynamic> {
10
+ method hashAll = self::HashAllList|hashAll;
11
+ tearoff hashAll = self::HashAllList|get#hashAll;
12
+ }
13
+ static method HashAll|hashAll(lowered final core::Iterable<dynamic> #this) → core::int
14
+ return 0;
15
+ static method HashAll|get#hashAll(lowered final core::Iterable<dynamic> #this) → () → core::int
16
+ return () → core::int => self::HashAll|hashAll(#this);
17
+ static method HashAllList|hashAll(lowered final core::List<dynamic> #this) → core::int
18
+ return 1;
19
+ static method HashAllList|get#hashAll(lowered final core::List<dynamic> #this) → () → core::int
20
+ return () → core::int => self::HashAllList|hashAll(#this);
21
+ static method main() → void {
22
+ core::List<dynamic> l = <dynamic>[];
23
+ core::Iterable<dynamic> i = <dynamic>[];
24
+ core::print(self::HashAllList|hashAll(l));
25
+ core::print(self::HashAll|hashAll(i));
26
+ }
Original file line number Diff line number Diff line change
1
+ library /*isNonNullableByDefault*/;
2
+ import self as self;
3
+ import "dart:core" as core;
4
+
5
+ extension HashAll on core::Iterable<dynamic> {
6
+ method hashAll = self::HashAll|hashAll;
7
+ tearoff hashAll = self::HashAll|get#hashAll;
8
+ }
9
+ extension HashAllList on core::List<dynamic> {
10
+ method hashAll = self::HashAllList|hashAll;
11
+ tearoff hashAll = self::HashAllList|get#hashAll;
12
+ }
13
+ static method HashAll|hashAll(lowered final core::Iterable<dynamic> #this) → core::int
14
+ ;
15
+ static method HashAll|get#hashAll(lowered final core::Iterable<dynamic> #this) → () → core::int
16
+ return () → core::int => self::HashAll|hashAll(#this);
17
+ static method HashAllList|hashAll(lowered final core::List<dynamic> #this) → core::int
18
+ ;
19
+ static method HashAllList|get#hashAll(lowered final core::List<dynamic> #this) → () → core::int
20
+ return () → core::int => self::HashAllList|hashAll(#this);
21
+ static method main() → void
22
+ ;
Original file line number Diff line number Diff line change
1
+ library /*isNonNullableByDefault*/;
2
+ import self as self;
3
+ import "dart:core" as core;
4
+
5
+ extension HashAll on core::Iterable<dynamic> {
6
+ method hashAll = self::HashAll|hashAll;
7
+ tearoff hashAll = self::HashAll|get#hashAll;
8
+ }
9
+ extension HashAllList on core::List<dynamic> {
10
+ method hashAll = self::HashAllList|hashAll;
11
+ tearoff hashAll = self::HashAllList|get#hashAll;
12
+ }
13
+ static method HashAll|hashAll(lowered final core::Iterable<dynamic> #this) → core::int
14
+ return 0;
15
+ static method HashAll|get#hashAll(lowered final core::Iterable<dynamic> #this) → () → core::int
16
+ return () → core::int => self::HashAll|hashAll(#this);
17
+ static method HashAllList|hashAll(lowered final core::List<dynamic> #this) → core::int
18
+ return 1;
19
+ static method HashAllList|get#hashAll(lowered final core::List<dynamic> #this) → () → core::int
20
+ return () → core::int => self::HashAllList|hashAll(#this);
21
+ static method main() → void {
22
+ core::List<dynamic> l = core::_GrowableList::•<dynamic>(0);
23
+ core::Iterable<dynamic> i = core::_GrowableList::•<dynamic>(0);
24
+ core::print(self::HashAllList|hashAll(l));
25
+ core::print(self::HashAll|hashAll(i));
26
+ }
You can’t perform that action at this time.
0 commit comments