Groovy web console

subscribe to the feed Subscribe
to this

Compile Static

Published 2 months ago by Anonymous
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
import groovy.transform.*

// Script works without this. When you enable the line it causes a null Pointer Exception. In either way it compiles successfully.
class A {
    Integer a

    A(Integer a) {
        this.a = a

    void doSomething() {

def a = new A()