mirror of
https://github.com/processing/processing4.git
synced 2026-01-25 17:31:07 +01:00
Though this was already fixed, just adding a test to confirm that it stays fixed. Need to respect calls to user-definined size methods including those defined in user-made classes.
51 lines
1.1 KiB
Plaintext
51 lines
1.1 KiB
Plaintext
import processing.core.*;
|
|
import processing.data.*;
|
|
import processing.event.*;
|
|
import processing.opengl.*;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.ArrayList;
|
|
import java.io.File;
|
|
import java.io.BufferedReader;
|
|
import java.io.PrintWriter;
|
|
import java.io.InputStream;
|
|
import java.io.OutputStream;
|
|
import java.io.IOException;
|
|
|
|
public class sizeclass extends PApplet {
|
|
|
|
// Thanks StanLepunK: https://github.com/processing/processing4/issues/317
|
|
Truc truc = new Truc();
|
|
|
|
public void setup() {
|
|
/* size commented out by preprocessor */;
|
|
truc.size(1,1); // problem >>> error \u00e0 "."
|
|
// func();
|
|
}
|
|
|
|
public void draw() {
|
|
truc.size(1,1); // no problem
|
|
}
|
|
|
|
public void func() {
|
|
truc.size(1,1); // no problem
|
|
}
|
|
|
|
class Truc {
|
|
public void size(int x, int y) {
|
|
}
|
|
}
|
|
|
|
|
|
public void settings() { size(200, 200); }
|
|
|
|
static public void main(String[] passedArgs) {
|
|
String[] appletArgs = new String[] { "sizeclass" };
|
|
if (passedArgs != null) {
|
|
PApplet.main(concat(appletArgs, passedArgs));
|
|
} else {
|
|
PApplet.main(appletArgs);
|
|
}
|
|
}
|
|
}
|