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

Compilation fails using inside flutter #6

Closed
ytitov opened this issue Oct 11, 2019 · 2 comments
Closed

Compilation fails using inside flutter #6

ytitov opened this issue Oct 11, 2019 · 2 comments

Comments

@ytitov
Copy link

ytitov commented Oct 11, 2019

I am getting the following error when running my app. I included the dart version and flutter version below. Any ideas?

../../../flutter/.pub-cache/hosted/pub.dartlang.org/cbor-2.0.2/lib/src/cbor_item_stack.dart:11:7: Error: Type argument 'LinkedListEntry<dynamic>' doesn't conform to the bound 'LinkedListEntry<E>' of the type variable 'E' on 'LinkedListEntry' in the supertype 'LinkedListEntry' of class 'ItemEntry'.

 - 'LinkedListEntry' is from 'dart:collection'.
Try changing type arguments so that they conform to the bounds.
class ItemEntry<DartItem> extends LinkedListEntry {
      ^

Flutter 1.9.1+hotfix.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision cc949a8e8b (2 weeks ago) • 2019-09-27 15:04:59 -0700
Engine • revision b863200c37
Tools • Dart 2.5.0

@ytitov
Copy link
Author

ytitov commented Oct 11, 2019

changing

class ItemEntry<DartItem> extends LinkedListEntry {
  DartItem value;

  ItemEntry(this.value);

  String toString() => "${super.toString()} : value.toString()";
}

TO:

class ItemEntry<DartItem> extends LinkedListEntry<ItemEntry> {
  DartItem value;

  ItemEntry(this.value);

  String toString() => "${super.toString()} : value.toString()";
}

made the compiler happy

@ytitov ytitov closed this as completed Oct 11, 2019
@ytitov ytitov reopened this Oct 11, 2019
@shamblett
Copy link
Owner

Thanks for this fix, package updated and republished at 2.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants