Add default values for some primitive type attributes.
[nit.git] / src / syntax / syntax_base.nit
index ecbeffa..b5ac33b 100644 (file)
@@ -207,8 +207,8 @@ abstract class Variable
 
        init(n: Symbol, d: PNode)
        do
-               assert n != null
-               assert d != null
+               #assert n != null
+               #assert d != null
                _name = n
                _decl = d
        end
@@ -415,6 +415,9 @@ end
 redef class AMethPropdef
        # Associated method (MM entity)
        meth method: MMMethSrcMethod is abstract
+
+       # Associated 'self' variable
+       meth self_var: ParamVariable is abstract
 end
 
 redef class ATypePropdef
@@ -454,7 +457,7 @@ end
 
 redef class AType
        attr _stype_cache: MMType
-       attr _stype_cached: Bool
+       attr _stype_cached: Bool = false
 
        redef meth get_local_class(v)
        do
@@ -578,6 +581,11 @@ redef class AForVardeclExpr
        readable writable attr _variable: AutoVariable
 end
 
+redef class ASelfExpr
+       # Associated local variable
+       readable writable attr _variable: ParamVariable 
+end
+
 redef class AVarFormExpr
        # Associated local variable
        readable writable attr _variable: Variable