Getting compiler-errors in IDEA but not when using Maven

Anyone can explain why compiling in IDEA gives compiler-error on valid code, which maven compiles just fine?

The java-code is (in maven-module A):

public class Fisk {
    public static class A {
    public static A A = new A();

The following JAVA-code is example of usage:

    Fisk.A a = new Fisk.A();
    Fisk.A b = Fisk.A;

Then in maven-module B, which has A as dependency the following code results in compiler-error in IDEA (but works in maven):

    val fisk = new Fisk.A()
val strupp: Fisk.A = Fisk.A

I posted a question regarding this here:


And filed a ticket here: http://youtrack.jetbrains.net/issue/SCL-3146


Please sign in to leave a comment.