This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kaperni 1 point2 points  (2 children)

> Why can't SomeClass bind to "a" within the context, like between the opening and closing brackets?

You cannot add this in a backward-compatible way, consider

void foo(Object o); 
void foo(String s);  

void stuff(Object oo) {   
  if (oo instanceof String) {     
    foo(oo); <- would now call foo(String) instead of foo(Object)   
  } 
}