Groovy web console

subscribe to the feed Subscribe
to this


Published 3 months ago by awalkowiak
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
Integer someIntValue = 1
def someNullValue = null

def calculation = someIntValue - someNullValue

// calculation will produce this:
// groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.Integer#minus.
// Cannot resolve which method to invoke for [null] due to overlapping prototypes between:  [class java.lang.Character]  [class java.lang.Number]  at script