Skip to content

confusing error: The argument type 'dart.core::String' can't be assigned to the parameter type 'dart.core::String'. #35715

Closed
@mraleph

Description

@mraleph

Flutter users reporting bizarre errors from the compiler that confusingly appear and disappear (might be related to serialized incremental compiler state?)

Compiler message:
lib/main.dart:73:35: Error: The argument type 'dart.core::String' can't be assigned to the parameter type 'dart.core::String'.
Try changing the type of the parameter, or casting the argument to 'dart.core::String'.
            image: new AssetImage('s'),

I don't have a concrete reproduction for it - but I asked users that face it to send us their Dart source if possible.

I saw some reports that users resolved it by changing import scheme from relative to package-scheme imports

Any ideas what can be causing this @peter-ahe-google @kmillikin @jensjoha ? Maybe a bug in class hierarchy?

Maybe we could add some debugging information to CFE to dump more debugging information for this sort of error?

Metadata

Metadata

Assignees

Labels

area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.customer-flutter

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions