Groovy web console

subscribe to the feed Subscribe
to this
site

TypeChecked-fail-int-x.groovy

Published 4 months ago by Anonymous
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
@groovy.transform.TypeChecked
void m(){
    int x

    x = 123
    println(x)
    println(x.getClass())

    println()

    x = "abc"
    println(x)
    println(x.getClass())
}

m()