Ahh.. in which case I apologies for the miscommunication on my part, I actually tried the Java syntax first - I then reduced the problem to simpler forms to post the issue.

Here is what I tried originally:

interface Foo {
    String name()
}
class Bar implements Foo {
    def String name() {
        return "Ronald"
    }
}

node {
    b = new Bar()
    a = b as Foo

    echo a.name()
}

This doesn't work either and the same exception Cannot invoke method visit() on null object is thrown.

Yet under a groovy console:

interface Foo {
    String name()
}

class Bar implements Foo {
    def String name() {
        return "Ronald"
    }
}

b = new Bar()
a = b as Foo

println a.name()

It works fine. Hence I think it is likely a problem with all uses of interface and why I'm on the lookout for a decent workaround

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to