Skip to content
← Back

src/semantic/types/null.ghul

1
namespace Semantic.Types is
2
3
class NULL: Type is
4
is_null: bool => true;
5
6
init() is
7
super.init();
8
si
9
10
specialize(type_map: Collections.Map[string,Type]) -> Type => self;
11
12
matches(other: Type) -> bool
13
=> true;
14
15
compare(other: Type) -> Types.MATCH
16
=> if !other.is_value_type \/ other.is_type_variable then MATCH.ASSIGNABLE else MATCH.DIFFERENT fi;
17
18
to_string() -> string => "null";
19
si
20
si