I am getting a strange compile error in Netbeans.
I am creating an Experiment object and calling a run method on it.
Experiment experiment=new Experiment();
Result result = experiment.run(t, steps, trials, breadth, depth, seed, distribution);
The compiler complains that
The type of run(Maplayout, int, int , int, int, long, int) is erroneous.
My method signature looks normal :
public Result run(MapLayout t, int steps, int trials,
int breadth, int depth, long seed, int distribution)
I have double checked the paramaters I am passing in and they all seem normal. If I pass in :
experiment.run(null, 1,1,1,1,1l,1);
I get the same compile error on the run method.
Am i missing something obvious? Has too much Javascript damaged my brain?
I had the same issue and the solution was very simple in my case.
The case:
I copy/paste some classes from another project in a package of the project i am working in.
Some of them had the old package declaration and the compiler didn't complained (for his reasons).
When i used a method with return type one of the 'wrong packaged' classes this error appeared.
(The Type of is erroneous)
The solution
To solve the issue, I changed the package declaration to be the correct one!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With