# The short name of the class
# In Nit, the name of a class cannot evolve in refinements
- redef var name: String
+ redef var name
# The canonical name of the class
#
# Internal name combining the module and the class
# Example: "mymodule#MyClass"
- redef var to_s: String is noinit
+ redef var to_s is noinit
init
do
# The short-name of the class, then the full-name of each type arguments within brackets.
# Example: `"Map[String, List[Int]]"`
- redef var to_s: String is noinit
+ redef var to_s is noinit
# The full-name of the class, then the full-name of each type arguments within brackets.
# Example: `"core::Map[core::String, core::List[core::Int]]"`
return res.to_s
end
- redef var need_anchor: Bool is noinit
+ redef var need_anchor is noinit
redef fun resolve_for(mtype, anchor, mmodule, cleanup_virtual)
do
self.to_s = "nullable {mtype}"
end
- redef var to_s: String is noinit
+ redef var to_s is noinit
redef var full_name is lazy do return "nullable {mtype.full_name}"
# The is only one null type per model, see `MModel::null_type`.
class MNullType
super MType
- redef var model: Model
+ redef var model
redef fun to_s do return "null"
redef fun full_name do return "null"
redef fun c_name do return "null"
# Semantically it is the singleton `null.as_notnull`.
class MBottomType
super MType
- redef var model: Model
+ redef var model
redef fun to_s do return "bottom"
redef fun full_name do return "bottom"
redef fun c_name do return "bottom"
super MEntity
# The name of the parameter
- redef var name: String
+ redef var name
# The static type of the parameter
var mtype: MType
var intro_mclassdef: MClassDef
# The (short) name of the property
- redef var name: String
+ redef var name
# The canonical name of the property.
#
# Internal name combining the module, the class and the property
# Example: "mymodule#MyClass#mymethod"
- redef var to_s: String is noinit
+ redef var to_s is noinit
# Is self the definition that introduce the property?
fun is_intro: Bool do return isset mproperty._intro and mproperty.intro == self
# Note this class is basically an enum.
# FIXME: use a real enum once user-defined enums are available
class MClassKind
- redef var to_s: String
+ redef var to_s
# Is a constructor required?
var need_init: Bool