Skip to content

"is not a enum" error when Enum is not in his own file #5

@smotastic

Description

@smotastic
class FirstClass {
  // ...
}
@Enume()
enum FirstClassEnum { foo, bar }

This will result in an error
'FirstClassEnum is not a enum and cannot be annotated with @\Enume()'

I guess the Problem is this check here

!EnumValidator.isEnum(element.enclosingElement)

As a workaround i put the enum in it's own dart file, but would be nice if i can put it together with the other class.

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