groovy

possible bug in ClassNode#isScript

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.0-JSR-3
  • Fix Version/s: 1.0-JSR-6
  • Component/s: ast builder
  • Labels:
    None
  • Number of attachments :
    0

Description

the current implementation of ClassNode#isScript is

public boolean isScript() { return script | isDerivedFrom(Type.SCRIPT_TYPE); }

but the base type for a script is changeable by a property, so this test is nonesense in this form.

Activity

Hide
blackdrag blackdrag added a comment -

the documentation says, that the custom base class must be a sublcass of Script, so it is save

Show
blackdrag blackdrag added a comment - the documentation says, that the custom base class must be a sublcass of Script, so it is save

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: