by shigemk2

当面は技術的なことしか書かない

cannot be accessed in object

あまり理解はできていない。というか、再現できない。

Scalaオブジェクトメモ(Hishidama's Scala object Memo)

Frequently Asked Questions - Java Interoperability | The Scala Programming Language

This is a known limitation of Scala: there is no notion of 'static' members in Scala. Instead, Scala treats static members of class Y as members of the singleton object Y (the companion object of class Y). When inheriting from this class, one can access only protected members of class Y but cannot access protected members of object Y.

こういうことが書いてある。Scalaは静的なメンバ関数は持たない。objectはシングルトンパターンを利用しているため、複数のオブジェクトを生成することは出来ない。なので、オブジェクトYに対して、アクセスすることも出来ない。