Skip to content

ConstantReader.revive cannot revive constant fields with a type not defined in the same library as the field #547

Open
@natebosch

Description

@natebosch

For instance trying to revive from

@Foo.foo
class Foo {
  static const foo = Deprecated('argument');
}

When we search for potential fields which define this argument, we only search the library that defines Deprecated), and of course never find a field equal to our object.

for (final type in origin!.definingCompilationUnit.types) {

If we could know to search the library defining Foo we'd find it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions