groovy

decide upon Java-like initializers

Details

  • Type: Task Task
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0-JSR-3
  • Fix Version/s: 1.0-JSR-6
  • Component/s: JSR / TCK / GLS
  • Labels:
    None
  • Number of attachments :
    0

Description

Java knows static initializers like

public class MyClass {
static String myField;
static { myField = new java.util.Date().toGMTString(); }
}

and object initializers like

public class MyClass {
String myField;
{ myField = new java.util.Date().toGMTString(); }
}

do we want to have them in Groovy as well?

Activity

Hide
blackdrag blackdrag added a comment -

static initializers are implemented now

Show
blackdrag blackdrag added a comment - static initializers are implemented now

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: