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

Interfaces do not inherit static variables #967

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

Interfaces do not inherit static variables #967

DartBot opened this issue Dec 26, 2011 · 5 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. closed-invalid Closed as we don't believe the reported issue is generally actionable

Comments

@DartBot
Copy link

DartBot commented Dec 26, 2011

This issue was originally filed by [email protected]


What steps will reproduce the problem?
consider the following test:

interface S {
  static final int foo = 1;
}

interface I extends S {
}

main() {
  Expect.equals(S.foo, I.foo);
}

What is the expected output? What do you see instead?
Expected: successful completion, since this is allowed by the spec.
Actual: Error: line 23 pos 26: unknown static field 'foo' Expect.equals(S.foo, I.foo);

What version of the product are you using? On what operating system?
DartVM r2810

Please provide any additional information below.
co19 test:
LangSpecTest/08_Interfaces/4_Superinterfaces/1/Inheritance/and/Overriding/A01/t02

@dgrove
Copy link
Contributor

dgrove commented Jan 2, 2012

Added Area-VM, Triaged labels.

@iposva-google
Copy link
Contributor

Matthias, there was quite a bit of change in this area since last Decemeber, can you please verify the current status and mark this bug accordingly? Thanks!


Set owner to @mhausner.
Added Accepted label.

@DartBot
Copy link
Author

DartBot commented May 31, 2012

This comment was originally written by @mhausner


My reading of the spec is that static members of interfaces are not inherited by subinterfaces.

Gilad, can you confirm that? If so, I will file a co19 bug to have the test removed. These days, the test is

dart/tests/co19/src/Language/08_Interfaces/4_Superinterfaces/1_Inheritance_and_Overriding_A01_t02.dart


Set owner to @gbracha.

@gbracha
Copy link
Contributor

gbracha commented May 31, 2012

Yes. Static members are not inherited.

@DartBot
Copy link
Author

DartBot commented Jun 4, 2012

This comment was originally written by @mhausner


Filed co19 issue #131 to have test Language/08_Interfaces/4_Superinterfaces/1_Inheritance_and_Overriding_A01_t02 removed from the suite. The VM is doing the correct thing:

1_Inheritance_and_Overriding_A01_t02.dart': Error: line 24 pos 26: unknown static field 'foo'
  Expect.equals(S.foo, I.foo);


Set owner to @mhausner.
Added Invalid label.

@DartBot DartBot added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. closed-invalid Closed as we don't believe the reported issue is generally actionable labels Jun 4, 2012
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-invalid Closed as we don't believe the reported issue is generally actionable
Projects
None yet
Development

No branches or pull requests

4 participants