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

dartc doesn't handle static fields properly in interfaces #2479

Closed
DartBot opened this issue Apr 6, 2012 · 4 comments
Closed

dartc doesn't handle static fields properly in interfaces #2479

DartBot opened this issue Apr 6, 2012 · 4 comments
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. closed-obsolete Closed as the reported issue is no longer relevant
Milestone

Comments

@DartBot
Copy link

DartBot commented Apr 6, 2012

This issue was originally filed by [email protected]


dartc fails co19 test Language/07_Classes/9_Superinterfaces_A04_t01.dart

/**
 * @­assertion An interface I inherits any members of its superinterfaces that
 * are not overridden by members declared in I.
 * @­description Checks that an interface inherits static members of its superinterfaces
 * (which can only be final initialized fields, according to grammar).
 * @­author vasya
 * @­reviewer rodionov
 * @­needsreview issue #7
 */

interface S {
  static final int foo = 1;
}

interface I extends S {
}

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

@kasperl
Copy link

kasperl commented Apr 17, 2012

Removed Area-Compiler label.
Added Area-Analyzer label.

@DartBot
Copy link
Author

DartBot commented May 16, 2012

This comment was originally written by [email protected]


I was trying to do exactly this with WebGLRenderingContext:

interface GL extends WebGLRenderingContext { }

... so that I can write idiomatic OpenGL code like gl.clear(GL.COLOR_BUFFER_BIT) instead of the absolutely heinous gl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT)

@danrubel
Copy link

danrubel commented Jun 4, 2012

Added this to the M1 milestone.

@DartBot
Copy link
Author

DartBot commented Jun 25, 2012

This comment was originally written by [email protected]


This test has been modified and Gilad has clarified in isssue 967 that static members are not inherited. A similar test,

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

 is to be removed as per co19 issue #131


Added AssumedStale label.

@DartBot DartBot added Type-Defect area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. closed-obsolete Closed as the reported issue is no longer relevant labels Jun 25, 2012
@DartBot DartBot added this to the M1 milestone Jun 25, 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-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. closed-obsolete Closed as the reported issue is no longer relevant
Projects
None yet
Development

No branches or pull requests

3 participants