Bug 1515 : generics: extends syntax broken on classes and methods
Last modified: 2010-03-17 12:58




Status:
RESOLVED
Resolution:
FIXED -
Priority:
P2
Severity:
normal

 

Reporter:
hansi
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2010-03-16 06:01
the following two statements should be valid, but cause syntax errors:

// a class definition that does something with things that extend PApplet
class Heythere<T extends PApplet>{
}

// method definition which can do things with papplet
public <T extends PApplet> void doSomething( T thing ){
}

interestingly it works in field definitions. this works just fine:
Vector<? extends PApplet> applets;
Additional Comment #1 From MrFeinberg 2010-03-16 06:06
Awesome; thanks.
Additional Comment #2 From MrFeinberg 2010-03-16 08:36
fixed.
Additional Comment #3 From hansi 2010-03-16 08:43
wow... that was fast...
now i have to see if can find another way to break it :)