File tree Expand file tree Collapse file tree
src/test/processing/parsing Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,7 +62,10 @@ pdeProgram
6262 // selected in the previous alternative. static mode programs
6363 // don't have member functions.
6464 //
65- | ( ( options {greedy =false ;}: possiblyEmptyField)* builtInType IDENT LPAREN )
65+ // The typeSpec match causes ANTLR to emit a warning about potentially
66+ // exiting the nongreedy match incorrectly, but I haven't found a case
67+ // of that in practice. Please report such a case!
68+ | ( (options {greedy =false ;}: possiblyEmptyField)* typeSpec[false] IDENT LPAREN )
6669 => activeProgram
6770 { pp.setProgramType(PdePreprocessor.ProgramType.ACTIVE); }
6871
Original file line number Diff line number Diff line change 1+ import processing.core.*;
2+ import processing.xml.*;
3+
4+ import java.applet.*;
5+ import java.awt.Dimension;
6+ import java.awt.Frame;
7+ import java.awt.event.MouseEvent;
8+ import java.awt.event.KeyEvent;
9+ import java.awt.event.FocusEvent;
10+ import java.awt.Image;
11+ import java.io.*;
12+ import java.net.*;
13+ import java.text.*;
14+ import java.util.*;
15+ import java.util.zip.*;
16+ import java.util.regex.*;
17+
18+ public class bug1512 extends PApplet {
19+ public void setup() {
20+ println("oi/*");
21+ noLoop();
22+ }
23+ static public void main(String args[]) {
24+ PApplet.main(new String[] { "--bgcolor=null", "bug1512" });
25+ }
26+ }
Original file line number Diff line number Diff line change 1+ println (" oi/*" );
Original file line number Diff line number Diff line change 1+ import processing.core.*;
2+ import processing.xml.*;
3+
4+ import java.applet.*;
5+ import java.awt.Dimension;
6+ import java.awt.Frame;
7+ import java.awt.event.MouseEvent;
8+ import java.awt.event.KeyEvent;
9+ import java.awt.event.FocusEvent;
10+ import java.awt.Image;
11+ import java.io.*;
12+ import java.net.*;
13+ import java.text.*;
14+ import java.util.*;
15+ import java.util.zip.*;
16+ import java.util.regex.*;
17+
18+ public class bug1515 extends PApplet {
19+
20+ // a class definition that does something with things that extend PApplet
21+ class Heythere<T extends PApplet>{
22+ }
23+
24+ // method definition which can do things with papplet
25+ public <T extends PApplet> void doSomething( T thing ){
26+ }
27+ static public void main(String args[]) {
28+ PApplet.main(new String[] { "--bgcolor=null", "bug1515" });
29+ }
30+ }
Original file line number Diff line number Diff line change 1+ // a class definition that does something with things that extend PApplet
2+ class Heythere <T extends PApplet >{
3+ }
4+
5+ // method definition which can do things with papplet
6+ public <T extends PApplet > void doSomething ( T thing ){
7+ }
Original file line number Diff line number Diff line change @@ -255,6 +255,11 @@ public void bug1511() {
255255 expectGood ("bug1511" );
256256 }
257257
258+ @ Test
259+ public void bug1512 () {
260+ expectGood ("bug1512" );
261+ }
262+
258263 @ Test
259264 public void bug1514a () {
260265 expectGood ("bug1514a" );
@@ -265,6 +270,11 @@ public void bug1514b() {
265270 expectGood ("bug1514b" );
266271 }
267272
273+ @ Test
274+ public void bug1515 () {
275+ expectGood ("bug1515" );
276+ }
277+
268278 @ Test
269279 public void bug1516 () {
270280 expectGood ("bug1516" );
You can’t perform that action at this time.
0 commit comments