Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Well, through what appears to be trial and error I seem to have fixed the problem. I had a file that looked "similar" to this:</p> <pre><code>import Test.TestObserver; import com.myself.ImportedClassThatCouldntBeFound; class Test extends ImportedClassThatCouldntBeFound { public interface TestObserver { public void event (); } public void addObserver (TestObserver observer) { ... } } public class AnotherTest { private Test test = new Test (); public void blah () { this.test.addObserver (new TestObserver () { public void event () { ... } }); } } </code></pre> <p>The problem happened at the TOP of the file. For some reason, Eclipse imported the inner interface!</p> <p>When I "REMOVED" that import, and then changed AnotherTest to:</p> <pre><code>public class AnotherTest { private Test test = new Test (); public void blah () { this.test.addObserver (new Test.TestObserver () { public void event () { ... } }); } } </code></pre> <p>it compiled correctly! I even verified it by putting the import BACK into the file and removing the fully declared interface name and it caused it to fail again! It's definitely one of the craziest compiler issues I've ever seen and once I get back the FOUR HOURS of my life that I lost researching this, I'll do more investigation into why this is occurring.</p> <p>This will be the first time I do this on StackOverflow, but I'm going to mark this as the solution because it most definitely was the issue. However, it definitely requires more research (at least on my part) to try and understand what was causing the compiler to become so confused.</p> <p><strong>edited this to make it apparent that the class that had the inner interface was extending the class that could not be found when compiled</strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload