-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cfe] Check getter/setter types on top level and extension members
Closes #43714 Change-Id: I07ee20cb3a65758dda2139e965aeb4fb36cf38c6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166628 Reviewed-by: Jens Johansen <jensj@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
- Loading branch information
1 parent
2ffa463
commit b2e33ee
Showing
35 changed files
with
2,569 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
pkg/front_end/testcases/extensions/extension_member_conflict.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
extension Extension<T> on int { | ||
int get duplicateInstanceGetter => 0; | ||
int get duplicateInstanceGetter => 0; | ||
|
||
void set duplicateInstanceSetter(int value) {} | ||
void set duplicateInstanceSetter(int value) {} | ||
|
||
void duplicateInstanceMethod() {} | ||
void duplicateInstanceMethod() {} | ||
|
||
static int duplicateStaticField = 0; | ||
static int duplicateStaticField = 0; | ||
|
||
static int get duplicateStaticGetter => 0; | ||
static int get duplicateStaticGetter => 0; | ||
|
||
static void set duplicateStaticSetter(int value) {} | ||
static void set duplicateStaticSetter(int value) {} | ||
|
||
static void duplicateStaticMethod() {} | ||
static void duplicateStaticMethod() {} | ||
|
||
int get duplicateInstanceGetterPlusSetter => 0; | ||
int get duplicateInstanceGetterPlusSetter => 0; | ||
void set duplicateInstanceGetterPlusSetter(int value) {} | ||
|
||
int get duplicateInstanceSetterPlusGetter => 0; | ||
void set duplicateInstanceSetterPlusGetter(int value) {} | ||
void set duplicateInstanceSetterPlusGetter(int value) {} | ||
|
||
int get duplicateInstanceGetterAndSetter => 0; | ||
int get duplicateInstanceGetterAndSetter => 0; | ||
void set duplicateInstanceGetterAndSetter(int value) {} | ||
void set duplicateInstanceGetterAndSetter(int value) {} | ||
|
||
static int get duplicateStaticGetterPlusSetter => 0; | ||
static int get duplicateStaticGetterPlusSetter => 0; | ||
static void set duplicateStaticGetterPlusSetter(int value) {} | ||
|
||
static int get duplicateStaticSetterPlusGetter => 0; | ||
static void set duplicateStaticSetterPlusGetter(int value) {} | ||
static void set duplicateStaticSetterPlusGetter(int value) {} | ||
|
||
static int get duplicateStaticGetterAndSetter => 0; | ||
static int get duplicateStaticGetterAndSetter => 0; | ||
static void set duplicateStaticGetterAndSetter(int value) {} | ||
static void set duplicateStaticGetterAndSetter(int value) {} | ||
|
||
int get instanceGetterAndStaticSetter => 0; | ||
static void set instanceGetterAndStaticSetter(int value) {} | ||
|
||
static int get instanceSetterAndStaticGetter => 0; | ||
void set instanceSetterAndStaticGetter(int value) {} | ||
|
||
int get instanceGetterAndStaticField => 0; | ||
static int instanceGetterAndStaticField = 0; | ||
|
||
void set instanceSetterAndStaticField(int value) {} | ||
static final int instanceGetterAndStaticField = 0; | ||
} | ||
|
||
main() {} |
Oops, something went wrong.