From: Brendan B. <bre...@gm...> - 2007-03-17 18:21:37
|
Hey Folks, I was playing with DrJava and I ran into a feature?/bug? which has me confused: in the interactions pane: Welcome to DrJava. Working directory is /home/bburns > int plus(int a, int b) { return a + b; } > plus(1,2) 3 > int plus(int a, int b) { return a-b; } > plus(1,2) AmbiguousFunctionException: Both functions match: (koala.dynamicjava.tree.MethodDeclaration: .... In every other interpreter I've ever played around with, the second definition of the plus function would overwrite the old definition. So my question is: what is going on? Is it intentional? Is there some sort of weird namespace that I'm unaware of? Thanks --brendan burns |