Skip to content

GrailsCompileStatic on domain class fails if inner enum  #10808

@Taack

Description

@Taack

When using GrailsCompileStatic on domain classes that do contains enum definitions in, compilation fails with the following message:

General error during canonicalization: Cannot get property 'initialExpression' on null object

java.lang.NullPointerException: Cannot get property 'initialExpression' on null object
at org.grails.compiler.ValidateableTypeCheckingExtension$_run_closure4.doCall(ValidateableTypeCheckingExtension.groovy:50)

Step to reproduce

  1. create an empty web project
  2. add domain class that contains enum class in
  3. add GrailsCompileStatic class annotation
  4. in the root of the project, launch build:

$ ./gradlew build
=> Compilation fails

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions