Skip to content

Issues compiling with Dev Sdk #123

@tensor-programming

Description

@tensor-programming

Currently on 2.0.0-dev.67.0 of the sdk.

A few type errors occur when trying to compile an RPC project.

Here are some of the common errors that seem to occur.

Error: A value of type '(dart.core::String, dynamic) → dart.core::Null' can't be assigned to a variable of type '(dynamic, dynamic) → void'.
Try changing the type of the left hand side, or casting the right hand side to '(dynamic, dynamic) → void'.
    (mapObject as Map).forEach((String key, object) {

Error: A value of type '(dart.core::String, dynamic) → dart.core::Null' can't be assigned to a variable of type '(dynamic, dynamic) → void'.
Try changing the type of the left hand side, or casting the right hand side to '(dynamic, dynamic) → void'.
    (encodedMap as Map).forEach((String key, encodedObject) {

Error: A value of type '(dart.core::String, dynamic) → dart.core::Null' can't be assigned to a variable of type '(dynamic, dynamic) → void'.
Try changing the type of the left hand side, or casting the right hand side to '(dynamic, dynamic) → void'.
    (result as Map).forEach((String key, value) {

The getter 'isRegularMethod' isn't defined for the class 'dart.mirrors::DeclarationMirror'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'isRegularMethod'.
      if (dm is! MethodMirror || !dm.isRegularMethod) {

Seems like most of these errors are a result of the dart strong mode changes for 2.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions