-
Notifications
You must be signed in to change notification settings - Fork 562
Open
Milestone
Description
XGo static members (including static methods, see #1847):
const T.name = ... // static constant
var T.name V = ... // static variable
func T.Method(arg1 T1, arg2 T2, ..., argN TN) (ret1 R1, ret2 R2, ..., retM RM) // static methodXGo classfile T's static members:
const name = ... // constant is always "static"
var T.name V = ...
var .name V = ...
func T.Method(arg1 T1, arg2 T2, ..., argN TN) (ret1 R1, ret2 R2, ..., retM RM)
func .Method(arg1 T1, arg2 T2, ..., argN TN) (ret1 R1, ret2 R2, ..., retM RM)Refer static members:
T.method(arg1, arg2, ..., argN) // call static method
T.name // access static variable/constatntIf accessing from within this classfile, or accessing the corresponding project class from a work class, it can be further simplified:
method(arg1, arg2, ..., argN) // call static method
name // access static variable/constatnt