Description
The following code Does not throw an compiler exception
interface Addon { Map getFactories() } class AddonImpl implements Addon { Map factories } class SubAddon extends AddonImpl { def factories = [a:1] }
whereas the method call will output the correct compiler error
interface Addon { Map getFactories() } class AddonImpl implements Addon { Map getFactories() { [:] } } class SubAddon extends AddonImpl { def getFactories() { [:] } }
the error being
The return type of java.lang.Object getFactories() in SubAddon is incompatible with java.util.Map getFactories() in AddonImpl