Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DartVM: getter may override a method in an interface #972

Closed
DartBot opened this issue Dec 26, 2011 · 7 comments
Closed

DartVM: getter may override a method in an interface #972

DartBot opened this issue Dec 26, 2011 · 7 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. closed-obsolete Closed as the reported issue is no longer relevant

Comments

@DartBot
Copy link

DartBot commented Dec 26, 2011

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

@DartBot
Copy link
Author

DartBot commented Dec 26, 2011

This comment was originally written by ief...@unipro.ru


The same works for setters, see co19 tests
LangSpecTest/08_Interfaces/2/Getters/and/Setters/A07/t02: Fail
LangSpecTest/08_Interfaces/2/Getters/and/Setters/A07/t03: Fail
LangSpecTest/08_Interfaces/2/Getters/and/Setters/A07/t04: Fail
LangSpecTest/08_Interfaces/2/Getters/and/Setters/A07/t05: Fail

@dgrove
Copy link
Contributor

dgrove commented Jan 2, 2012

Added Area-VM, Triaged labels.

@iposva-google
Copy link
Contributor

Marked this as being blocked by #1031.

@iposva-google
Copy link
Contributor

Matthias, can you please work with Gilad to resolve whether these are still expected to be compile-time errors and whether they should be. See the blocking bug.


cc @gbracha.
Set owner to @mhausner.
Added Accepted label.

@gbracha
Copy link
Contributor

gbracha commented Mar 16, 2012

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.

@DartBot
Copy link
Author

DartBot commented Mar 16, 2012

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).

@DartBot
Copy link
Author

DartBot commented Jan 22, 2013

This comment was originally written by @mhausner


We eliminated explicit interfaces.


Added AssumedStale label.
Marked this as being blocked by #1031.
Unmarked this as being blocked by #1031.

@DartBot DartBot added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. closed-obsolete Closed as the reported issue is no longer relevant labels Jan 22, 2013
dart-bot pushed a commit that referenced this issue Dec 8, 2020
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 closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. closed-obsolete Closed as the reported issue is no longer relevant
Projects
None yet
Development

No branches or pull requests

4 participants