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

Strong-mode analysis errors prevent DDC compilation #23

Closed
ochafik opened this issue Mar 16, 2016 · 5 comments
Closed

Strong-mode analysis errors prevent DDC compilation #23

ochafik opened this issue Mar 16, 2016 · 5 comments
Labels
type-enhancement A request for a change that isn't a bug

Comments

@ochafik
Copy link

ochafik commented Mar 16, 2016

The following list of strong-mode errors prevent code that depend on package:collection from being compiled with DDC.

(ran dartanalyzer --strong find lib -name '*.dart' | sort -u with SDK version 1.16.0-dev.0.0)

[error] Base class introduces an invalid override. The type of _DelegatingIterableBase.expand (((E) → Iterable<dynamic>) → Iterable<dynamic>) is not a subtype of Iterable<E>.expand (<T>((E) → Iterable<T>) → Iterable<T>). (./lib/src/wrappers.dart, line 194, col 24)
[error] Base class introduces an invalid override. The type of _DelegatingIterableBase.expand (((E) → Iterable<dynamic>) → Iterable<dynamic>) is not a subtype of Iterable<E>.expand (<T>((E) → Iterable<T>) → Iterable<T>). (./lib/src/wrappers.dart, line 245, col 26)
[error] Base class introduces an invalid override. The type of _DelegatingIterableBase.expand (((E) → Iterable<dynamic>) → Iterable<dynamic>) is not a subtype of Iterable<E>.expand (<T>((E) → Iterable<T>) → Iterable<T>). (./lib/src/wrappers.dart, line 97, col 25)
[error] Base class introduces an invalid override. The type of _DelegatingIterableBase.expand (((V) → Iterable<dynamic>) → Iterable<dynamic>) is not a subtype of Iterable<V>.expand (<T>((V) → Iterable<T>) → Iterable<T>). (./lib/src/wrappers.dart, line 414, col 25)
[error] Base class introduces an invalid override. The type of _DelegatingIterableBase.fold ((dynamic, (dynamic, E) → dynamic) → dynamic) is not a subtype of Iterable<E>.fold (<T>(T, (T, E) → T) → T). (./lib/src/wrappers.dart, line 194, col 24)
[error] Base class introduces an invalid override. The type of _DelegatingIterableBase.fold ((dynamic, (dynamic, E) → dynamic) → dynamic) is not a subtype of Iterable<E>.fold (<T>(T, (T, E) → T) → T). (./lib/src/wrappers.dart, line 245, col 26)
[error] Base class introduces an invalid override. The type of _DelegatingIterableBase.fold ((dynamic, (dynamic, E) → dynamic) → dynamic) is not a subtype of Iterable<E>.fold (<T>(T, (T, E) → T) → T). (./lib/src/wrappers.dart, line 97, col 25)
[error] Base class introduces an invalid override. The type of _DelegatingIterableBase.fold ((dynamic, (dynamic, V) → dynamic) → dynamic) is not a subtype of Iterable<V>.fold (<T>(T, (T, V) → T) → T). (./lib/src/wrappers.dart, line 414, col 25)
[error] Base class introduces an invalid override. The type of _DelegatingIterableBase.map (((E) → dynamic) → Iterable<dynamic>) is not a subtype of Iterable<E>.map (<T>((E) → T) → Iterable<T>). (./lib/src/wrappers.dart, line 194, col 24)
[error] Base class introduces an invalid override. The type of _DelegatingIterableBase.map (((E) → dynamic) → Iterable<dynamic>) is not a subtype of Iterable<E>.map (<T>((E) → T) → Iterable<T>). (./lib/src/wrappers.dart, line 245, col 26)
[error] Base class introduces an invalid override. The type of _DelegatingIterableBase.map (((E) → dynamic) → Iterable<dynamic>) is not a subtype of Iterable<E>.map (<T>((E) → T) → Iterable<T>). (./lib/src/wrappers.dart, line 97, col 25)
[error] Base class introduces an invalid override. The type of _DelegatingIterableBase.map (((V) → dynamic) → Iterable<dynamic>) is not a subtype of Iterable<V>.map (<T>((V) → T) → Iterable<T>). (./lib/src/wrappers.dart, line 414, col 25)
[error] Invalid override. The type of _DelegatingIterableBase.expand (((E) → Iterable<dynamic>) → Iterable<dynamic>) is not a subtype of Iterable<E>.expand (<T>((E) → Iterable<T>) → Iterable<T>). (./lib/src/wrappers.dart, line 27, col 3)
[error] Invalid override. The type of _DelegatingIterableBase.fold ((dynamic, (dynamic, E) → dynamic) → dynamic) is not a subtype of Iterable<E>.fold (<T>(T, (T, E) → T) → T). (./lib/src/wrappers.dart, line 34, col 3)
[error] Invalid override. The type of _DelegatingIterableBase.map (((E) → dynamic) → Iterable<dynamic>) is not a subtype of Iterable<E>.map (<T>((E) → T) → Iterable<T>). (./lib/src/wrappers.dart, line 54, col 3)
[error] Type check failed: const DefaultEquality() (DefaultEquality) is not of type Equality<E> (./lib/src/equality.dart, line 182, col 38)
[error] Type check failed: const DefaultEquality() (DefaultEquality) is not of type Equality<E> (./lib/src/equality.dart, line 198, col 38)
[error] Type check failed: const DefaultEquality() (DefaultEquality) is not of type Equality<E> (./lib/src/equality.dart, line 56, col 31)
[error] Type check failed: const DefaultEquality() (DefaultEquality) is not of type Equality<E> (./lib/src/equality.dart, line 99, col 53)
[error] Type check failed: const DefaultEquality() (DefaultEquality) is not of type Equality<K> (./lib/src/equality.dart, line 234, col 42)
[error] Type check failed: const DefaultEquality() (DefaultEquality) is not of type Equality<V> (./lib/src/equality.dart, line 235, col 44)
[warning] Missing concrete implementation of 'Iterable.expand', 'Iterable.fold' and 'Iterable.map' (./lib/src/unmodifiable_wrappers.dart, line 20, col 7)
[warning] Missing concrete implementation of 'Iterable.expand', 'Iterable.fold' and 'Iterable.map' (./lib/src/unmodifiable_wrappers.dart, line 93, col 7)
[warning] Missing concrete implementation of 'Iterable.expand', 'Iterable.fold' and 'Iterable.map' (./lib/src/wrappers.dart, line 194, col 7)
[warning] Missing concrete implementation of 'Iterable.expand', 'Iterable.fold' and 'Iterable.map' (./lib/src/wrappers.dart, line 245, col 7)
[warning] Missing concrete implementation of 'Iterable.expand', 'Iterable.fold' and 'Iterable.map' (./lib/src/wrappers.dart, line 339, col 7)
[warning] Missing concrete implementation of 'Iterable.expand', 'Iterable.fold' and 'Iterable.map' (./lib/src/wrappers.dart, line 414, col 7)
[warning] Missing concrete implementation of 'Iterable.expand', 'Iterable.fold' and 'Iterable.map' (./lib/src/wrappers.dart, line 97, col 7)
[warning] The redirected constructor '() → DefaultEquality' has incompatible parameters with '() → Equality<E>' (./lib/src/equality.dart, line 11, col 30)
[warning] Unsound implicit cast from (dynamic, dynamic) → int to (E, E) → int (./lib/src/priority_queue.dart, line 210, col 15)
[warning] Unsound implicit cast from (dynamic, dynamic) → int to (E, E) → int (./lib/src/priority_queue.dart, line 215, col 38)
[warning] Unsound implicit cast from Iterable<E> to List<dynamic> (./lib/src/queue_list.dart, line 38, col 25)
[warning] Unsound implicit cast from Iterable<E> to List<dynamic> (./lib/src/queue_list.dart, line 55, col 19)
[warning] Unsound implicit cast from List<dynamic> to Iterable<E> (./lib/src/queue_list.dart, line 39, col 40)
[warning] Unsound implicit cast from List<dynamic> to Iterable<E> (./lib/src/queue_list.dart, line 61, col 52)
[warning] Unsound implicit cast from List<dynamic> to Iterable<E> (./lib/src/queue_list.dart, line 67, col 52)
[warning] Unsound implicit cast from List<dynamic> to Iterable<E> (./lib/src/queue_list.dart, line 71, col 52)
[warning] Unsound implicit cast from List<dynamic> to Iterable<E> (./lib/src/queue_list.dart, line 72, col 40)
[warning] Unsound implicit cast from List<dynamic> to List<Comparable<dynamic>> (./lib/src/algorithms.dart, line 36, col 36)
[warning] Unsound implicit cast from List<dynamic> to List<Comparable<dynamic>> (./lib/src/algorithms.dart, line 84, col 34)
[warning] Unsound implicit cast from List<dynamic> to List<Iterator<dynamic>> (./lib/src/iterable_zip.dart, line 33, col 47)
[warning] Unsound implicit cast from dynamic to C (./lib/src/canonicalized_map.dart, line 61, col 11)
[warning] Unsound implicit cast from dynamic to C (./lib/src/canonicalized_map.dart, line 93, col 30)
[warning] Unsound implicit cast from dynamic to E (./lib/src/equality.dart, line 68, col 36)
[warning] Unsound implicit cast from dynamic to E (./lib/src/equality.dart, line 68, col 49)
[warning] Unsound implicit cast from dynamic to E (./lib/src/unmodifiable_wrappers.dart, line 59, col 28)
[warning] Unsound implicit cast from dynamic to E (./lib/src/unmodifiable_wrappers.dart, line 63, col 21)
[warning] Unsound implicit cast from dynamic to K (./lib/src/wrappers.dart, line 443, col 13)
[warning] Unsound implicit cast from dynamic to V (./lib/src/unmodifiable_wrappers.dart, line 151, col 41)
[warning] Unsound implicit cast from dynamic to V (./lib/src/unmodifiable_wrappers.dart, line 159, col 27)
@nex3 nex3 added the type-enhancement A request for a change that isn't a bug label Mar 16, 2016
@nex3
Copy link
Member

nex3 commented Mar 16, 2016

I have some partial work locally towards making this package strong-mode clean, but last I worked on it I ran into some issues with the core libraries not being fully generic-annotated yet.

@ochafik
Copy link
Author

ochafik commented Mar 17, 2016

Seems like strong-mode is a moving target, might be worth retrying with the latest dev sdk. And if you push your changes to a branch I'll be happy to check!

@nex3
Copy link
Member

nex3 commented Mar 17, 2016

I've pushed my partial work to the wip.strong-mode branch.

@ochafik
Copy link
Author

ochafik commented Mar 18, 2016

Cool, thanks! Merged + fixed last issues in #24 :-)

@ochafik
Copy link
Author

ochafik commented Mar 29, 2016

Fixed by 7ac6f9b, thanks @nex!

@ochafik ochafik closed this as completed Mar 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants