Skip to content

Generated code doesn't work if there is a field called 'Type' #15

@miklcct

Description

@miklcct

Sample code

import 'package:morphy_annotation/morphy_annotation.dart';

import 'bar.dart' as bar;

part 'foo.g.dart';
part 'foo.morphy.dart';

@Morphy(generateJson: true)
abstract class $Foo {
    String get Type;
}

The generated code throws error The name 'Type' isn't a type, so it can't be used as a type argument.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions