-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
DartVM: getter may override a method in an interface #972
Comments
This comment was originally written by ief...@unipro.ru The same works for setters, see co19 tests |
Marked this as being blocked by #1031. |
This is spec'ed as a compile-time error and there is no plan to change it AFIK. More specifically, interface I should cause an error, as it has both a getter and a method of the same name. |
This comment was originally written by @seaneagan Just want to note that issue #1616 proposes to make legal overriding methods with getters (and vice versa). In that proposal, it would be a static type warning for the return type of the overriding getter to not be a subtype of the function type matching the signature of the overridden method (or vice versa). |
This comment was originally written by @mhausner We eliminated explicit interfaces. Added AssumedStale label. |
2020-12-06 sgrekhov@unipro.ru Fixes #972. Remove nnbd-strong flag from static Subtyping tests 2020-12-04 irina.arkhipets@gmail.com Fixes #973: `SharedOptions=--enable-experiment=triple-shift` tag removed from the tests. 2020-12-04 irina.arkhipets@gmail.com Issue #972: needless `Requirements=nnbd-strong` tag removed. 2020-12-04 irina.arkhipets@gmail.com Issue #972: `Requirements=nnbd-strong` tags removed from the following LanguageFeatures/nnbd tests: tripple-shift, type-aliases, type-normalization. 2020-12-04 irina.arkhipets@gmail.com Issue #972: `Requirements=nnbd-strong` tags removed from LanguageFeatures/nnbd/ovrriding tests. 2020-12-04 irina.arkhipets@gmail.com Issue #972: `Requirements=nnbd-strong` tags remoed from LanguqgeFeatures/nnbd/Least-greatest-closure/nonfunction_typedef tests. Duplicated nonfunction)typedef tests removed. 2020-12-04 irina.arkhipets@gmail.com Issue #972: `Requirements=nnbd-strong` tags remoed from LanguqgeFeatures/nnbd/Least-greatest-closure/class, LanguqgeFeatures/nnbd/Least-greatest-closure/nonfunction_typedef tests. 2020-12-04 irina.arkhipets@gmail.com Issue #972: `Requirements=nnbd-strong` tags remoed from LanguqgeFeatures/nnbd/flow-analysis tests. 2020-12-04 irina.arkhipets@gmail.com Issue #463: Missing Requirements=nnbd-strong tags added. 2020-12-03 irina.arkhipets@gmail.com Fix for the Issue #972: `Requirements=nnbd-strong` removed from LanguageFeatures/nnbd tests (without subdirectories) 2020-12-02 sgrekhov@unipro.ru Cross Origin Error for HttpRequest tests fixed 2020-12-02 irina.arkhipets@gmail.com Typo corrected. 2020-12-01 sgrekhov@unipro.ru Test that use tripple shift operation moved to tripple-shift directory Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try Change-Id: I5f19e8ddc738713b2339cae22d1d1925e35b1da2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175242 Commit-Queue: Alexander Thomas <athom@google.com> Reviewed-by: William Hesse <whesse@google.com>
This issue was originally filed by ief...@unipro.ru
What steps will reproduce the problem?
consider the following test:
interface S {
void m();
}
interface I extends S {
int m;
}
class A implements I {}
main() {
new A().m;
}
What is the expected output? What do you see instead?
Expected: compile-time error
Actual: successful completion
What version of the product are you using? On what operating system?
DartVM r2810
Please provide any additional information below.
co19 tests:
LangSpecTest/08_Interfaces/2/Getters/and/Setters/A03/t02: Fail
LangSpecTest/08_Interfaces/2/Getters/and/Setters/A03/t03: Fail
The text was updated successfully, but these errors were encountered: