Skip to content

Instantly share code, notes, and snippets.

@mather
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mather/9363963 to your computer and use it in GitHub Desktop.
Save mather/9363963 to your computer and use it in GitHub Desktop.
Scalaでは定数を含むインターフェースの継承クラスから定数を取得できない…
public interface A {
public static final String C = "hoge";
}
public class B implements A {
}
scala> A.C
res0: String = hoge
scala> B.C
<console>:8: error: value C is not a member of object B
B.C
^
scala> (new B).C
<console>:8: error: value C is not a member of B
(new B).C
^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment