sym.isStatic

85 views
Skip to first unread message

Eugene Burmako

unread,
Mar 31, 2012, 5:03:11 AM3/31/12
to scala-internals
When exactly is a sym marked as STATIC?

martin odersky

unread,
Mar 31, 2012, 5:04:44 AM3/31/12
to scala-i...@googlegroups.com


On Sat, Mar 31, 2012 at 11:03 AM, Eugene Burmako <eugene....@epfl.ch> wrote:
When exactly is a sym marked as STATIC?

If it's a member of a toplevel object, or of an object contained in a toplevel object, or any number of levels deep.

Cheers

 - Martin


Eugene Burmako

unread,
Mar 31, 2012, 5:18:38 AM3/31/12
to scala-i...@googlegroups.com
Aha, so it also affects members - this is what caused my problems. By the way, why?

martin odersky

unread,
Mar 31, 2012, 5:43:03 AM3/31/12
to scala-i...@googlegroups.com
On Sat, Mar 31, 2012 at 11:18 AM, Eugene Burmako <eugene....@epfl.ch> wrote:
Aha, so it also affects members - this is what caused my problems. By the way, why?

To find out whether a class needs an outer pointer, for instance.

Btw if you want just objects, not members, it's isStaticOwner which should be the right call.

 -- Martin


On 31 March 2012 11:04, martin odersky <martin....@epfl.ch> wrote:


On Sat, Mar 31, 2012 at 11:03 AM, Eugene Burmako <eugene....@epfl.ch> wrote:
When exactly is a sym marked as STATIC?

If it's a member of a toplevel object, or of an object contained in a toplevel object, or any number of levels deep.

Cheers

 - Martin






--
Martin Odersky
Prof., EPFL and Chairman, Typesafe
PSED, 1015 Lausanne, Switzerland
Tel. EPFL: +41 21 693 6863
Tel. Typesafe: +41 21 691 4967

Reply all
Reply to author
Forward
0 new messages