Skip to content

@CacheEvict & CompileStatic errors for key closures #15191

@jdaugherty

Description

@jdaugherty

Issue description

The following code worked in Grails 6 on a class annotated with @CompileStatic

    @CacheEvict(value = "apiTokens", key = { token })
    void deleteByToken(String token) {

In Grails 7, this fails with:

   [Static type checking] - The variable [token] is undeclared.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions