Skip to content

dartc fails test on implementing 2 generics #2495

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

Closed
DartBot opened this issue Apr 9, 2012 · 3 comments
Closed

dartc fails test on implementing 2 generics #2495

DartBot opened this issue Apr 9, 2012 · 3 comments
Labels
closed-duplicate Closed in favor of an existing report legacy-area-analyzer Use area-devexp instead.
Milestone

Comments

@DartBot
Copy link

DartBot commented Apr 9, 2012

This issue was originally filed by [email protected]


dartc is failing this test: Language/13_Types/4_Interface_Types_A11_t04.dart

/**
 * @­assertion A type T is more specific than a type S, written T << S, if T << U and U << S.
 * << is a partial order on types. T is a subtype of S, written T <: S, iff [⊥/Dynamic]T << S.
 * A type T may be assigned to a type S, written T <=> S, if either T <: S or S <: T .
 * @­description Checks that if type T is a subtype of S1 and S2 where S1 <: S<G1> and S2 <: S<G2> then
 * T is a subtype of S<G1> as well as S<G2> and every other supertype of S.
 * @­author iefremov
 * @­reviewer rodionov
 */

interface S<T> {}

interface S1 extends S<int> {}

interface S2 extends S<double> {}

class T implements S1, S2 {}

main() {
  Expect.isTrue(new T() is S<int>);
  Expect.isTrue(new T() is S<double>);
  Expect.isTrue(new T() is S<num>);
  Expect.isTrue(new T() is S<Object>);
  Expect.isTrue(new T() is S);
}

it gives this error:

$ dartc tests/co19/src/Language/13_Types/4_Interface_Types_A11_t04.dart
file:/home/zundel/dart-all/dart/tests/co19/src/Language/13_Types/4_Interface_Types_A11_t04.dart:17: Type variable 'T' is hiding 'CLASS T' at 4_Interface_Types_A11_t04.dart:T:23:7
    16:
    17: interface S<T> {}
file:/home/zundel/dart-all/dart/tests/co19/src/Language/13_Types/4_Interface_Types_A11_t04.dart:23: S<int> and S<double> are duplicated in the supertype graph
    22:
    23: class T implements S1, S2 {}

@kasperl
Copy link

kasperl commented Apr 17, 2012

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

@danrubel
Copy link

danrubel commented Jun 4, 2012

Added this to the M1 milestone.

@DartBot
Copy link
Author

DartBot commented Jun 22, 2012

This comment was originally written by [email protected]


https://chromiumcodereview.appspot.com/10627017


Set owner to [email protected].
Added Duplicate label.
Marked as being merged into #3803.

@DartBot DartBot added Type-Defect legacy-area-analyzer Use area-devexp instead. closed-duplicate Closed in favor of an existing report labels Jun 22, 2012
@DartBot DartBot added this to the M1 milestone Jun 22, 2012
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report legacy-area-analyzer Use area-devexp instead.
Projects
None yet
Development

No branches or pull requests

3 participants