Take this Java class:
public class Fisk {
public static class A {
}
public static A A = new A();
}
This Java code works:
Fisk.A a = new Fisk.A();
Fisk.A b = Fisk.A;
But calling it from Scala:
val fisk = new Fisk.A()
val strupp = Fisk.A
results in compiler-error:
error: ambiguous reference to overloaded definition,
[INFO] both variable A in object Fisk of type Fisk.A
[INFO] and object A in object Fisk of type object Fisk.A
[INFO] match expected type ?
[INFO] val strupp = Fisk.A
[INFO] ^
[ERROR] one error found
Anyone knows a way around this, or do I have to rename my static field?
-- Andreas
val strupp: Fisk.A = Fisk.A
?