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

Superinterfaces' members with the same name should produce a static warning #3306

Closed
DartBot opened this issue May 30, 2012 · 5 comments
Closed
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 May 30, 2012

This issue was originally filed by [email protected]


What steps will reproduce the problem?
Run the following test with dartc:

interface SI1 {
  void foo(var v, [int foo, int bar]);
}

interface SI2 {
  void foo(var v, [int foo, int b4r]);
}

interface I extends SI1, SI2 {}

main() {
  I i = null;
  i.foo(null, null, null);
}

What is the expected output? What do you see instead?
According to the section 8.4.1 of the specification: "if there are multiple members m1, …, mk with the same name n that would be inherited (because identically named members existed in several superinterfaces) then at most one member is inherited. If the static types T1, …, Tk of the members m1, …, mk are not identical, then there must be a member mx such that Tx <: Ti, 1 <= x <= k for all i, 1 <= i <= k, or a static type warning occurs."
So, expected result is a static warning, since foo of S1 and foo of S2 have different types and none of them is a subtype of another.
Actual result: dartc does not produce a static warning.

What version of the product are you using? On what operating system?
Dartc, r8088. OS Ubuntu 10.04

Please provide any additional information below.
co19 tests:
Language/08_Interfaces/4_Superinterfaces/1_Inheritance_and_Overriding_A02_t01.dart
Language/08_Interfaces/4_Superinterfaces/1_Inheritance_and_Overriding_A02_t03.dart
Language/08_Interfaces/4_Superinterfaces/1_Inheritance_and_Overriding_A02_t04.dart
 Language/08_Interfaces/4_Superinterfaces/1_Inheritance_and_Overriding_A02_t04.dart

@madsager
Copy link
Contributor

Added Area-Analyzer, Triaged labels.

@danrubel
Copy link

danrubel commented Jun 4, 2012

Added this to the M1 milestone.

@bwilkerson
Copy link
Member

The listed tests are currently passing and there are no tests marked as failing because of this issue.


Added AssumedStale label.

@DartBot
Copy link
Author

DartBot commented Dec 11, 2012

This comment was originally written by [email protected]


following tests do not produce any errors both under dart vm and dart analyzer:

/Language/08_Interfaces/5_Superinterfaces/1_Inheritance_and_Overriding_A02_t01.dart
/Language/08_Interfaces/5_Superinterfaces/1_Inheritance_and_Overriding_A02_t02.dart
/Language/08_Interfaces/5_Superinterfaces/1_Inheritance_and_Overriding_A02_t04.dart

@DartBot
Copy link
Author

DartBot commented Dec 11, 2012

This comment was originally written by [email protected]


clarification: they're expected to produce static type warnings

@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 Dec 11, 2012
@DartBot DartBot added this to the M1 milestone Dec 11, 2012
copybara-service bot pushed a commit that referenced this issue Jan 26, 2023
Revisions updated by `dart tools/rev_sdk_deps.dart`.

args (https://github.com/dart-lang/args/compare/04c9346..a23ea85):
  a23ea85  2023-01-25  Devon Carew  update the publishing script (#232)

dartdoc (https://github.com/dart-lang/dartdoc/compare/ed56883..99df16a):
  99df16a0  2023-01-24  Parker Lougheed  Use a sun for light theme toggle instead of moon (#3309)
  758e1851  2023-01-24  Parker Lougheed  Switch dart:js and some dart:js_util usages to use static interop (#3299)
  9735d895  2023-01-24  dependabot[bot]  Bump github/codeql-action from 2.1.38 to 2.1.39 (#3306)
  f6cd8eb9  2023-01-23  Sam Rawlins  Fix various bits in testing code to comply with new warnings (#3307)

http (https://github.com/dart-lang/http/compare/57c53b0..092bb2d):
  092bb2d  2023-01-25  Brian Quinlan  Create a `package:cronet_http/cronet_http.dart` import (#859)
  a62f5b3  2023-01-24  Brian Quinlan  Create a single top-level lib file. (#858)

intl (https://github.com/dart-lang/intl/compare/3fcc810..946c34c):
  946c34c  2023-01-25  Copybara-Service  Merge pull request #533 from dart-lang:updateVersion
  19b6785  2023-01-20  Moritz  Append `-dev` to current version

sse (https://github.com/dart-lang/sse/compare/be426a2..4e63b08):
  4e63b08  2023-01-25  Kevin Moore  Fix deprecated import to webdriver library (#76)

webdev (https://github.com/dart-lang/webdev/compare/f978b90..a347fa0):
  a347fa0  2023-01-25  Anna Gringauze  Update vm_service to version 10.0.0 (#1917)
  4dd29a5  2023-01-24  Anna Gringauze  Allow dart SDK <4.0.0 (#1913)
  b3db2c9  2023-01-24  Anna Gringauze  Prepare for dart 3.0 alpha changes: Handle SDK layout update (#1907)

Change-Id: I84d827db044f5b0af49b0454fd1d69b0d2ddf692
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279901
Commit-Queue: Konstantin Shcheglov <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
Auto-Submit: Devon Carew <[email protected]>
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

4 participants