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

Compile Error on Dart 2.3.3 #16

Closed
CatherineThompson opened this issue Jun 13, 2019 · 2 comments
Closed

Compile Error on Dart 2.3.3 #16

CatherineThompson opened this issue Jun 13, 2019 · 2 comments
Assignees

Comments

@CatherineThompson
Copy link

I'm getting the following compiler message when trying to use dartz Options in a flutter project. It' on Dart 2.3.3.

    Compiler message:
    file:///Users/catherinethompson/.pub-cache/hosted/pub.dartlang.org/dartz-0.8.4/lib/src/endo.dart:5:7: Error: Found unsupported uses of 'A' in supertype 'Monoid'.
    class EndoMonoid<A> extends Monoid<Endo<A>> {
          ^
    file:///Users/catherinethompson/.pub-cache/hosted/pub.dartlang.org/dartz-0.8.4/lib/src/endo.dart:11:33: Error: A value of type 'EndoMonoid<dynamic>' can't be assigned to a variable of type 'Monoid<dynamic Function(dynamic)>'.
     - 'EndoMonoid' is from 'package:dartz/dartz.dart' ('file:///Users/catherinethompson/.pub-cache/hosted/pub.dartlang.org/dartz-0.8.4/lib/dartz.dart').
     - 'Monoid' is from 'package:dartz/dartz.dart' ('file:///Users/catherinethompson/.pub-cache/hosted/pub.dartlang.org/dartz-0.8.4/lib/dartz.dart').
    Try changing the type of the left hand side, or casting the right hand side to 'Monoid<dynamic Function(dynamic)>'.
    final Monoid<Endo> EndoMi = new EndoMonoid();
                                    ^
    file:///Users/catherinethompson/.pub-cache/hosted/pub.dartlang.org/dartz-0.8.4/lib/src/endo.dart:12:36: Error: A value of type 'EndoMonoid<dynamic>' can't be assigned to a variable of type 'Monoid<A Function(A)>'.
     - 'EndoMonoid' is from 'package:dartz/dartz.dart' ('file:///Users/catherinethompson/.pub-cache/hosted/pub.dartlang.org/dartz-0.8.4/lib/dartz.dart').
     - 'Monoid' is from 'package:dartz/dartz.dart' ('file:///Users/catherinethompson/.pub-cache/hosted/pub.dartlang.org/dartz-0.8.4/lib/dartz.dart').
    Try changing the type of the left hand side, or casting the right hand side to 'Monoid<A Function(A)>'.
    Monoid<Endo<A>> endoMi<A>() => new EndoMonoid();
                                       ^
@spebbe
Copy link
Owner

spebbe commented Jun 14, 2019

Hi and thanks for reporting!

This looks identical to #12, which was closed a bit prematurely. A solution exists, but hasn't been released yet. I'll make a fix release soon and will keep this issue open until then.

@spebbe spebbe self-assigned this Jun 14, 2019
@spebbe
Copy link
Owner

spebbe commented Jun 17, 2019

Released in 0.8.5 from master and rebased onto 0_9_0_wip_2

@spebbe spebbe closed this as completed Jun 17, 2019
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