Skip to content
← Back

src/ir/values/default.ghul

1
namespace IR.Values is
2
use Semantic.Types.Type
3
4
class DEFAULT: Value is
5
type: Type
6
is_value_type: bool => type.is_value_type
7
is_value_tuple: bool => type.is_value_tuple
8
9
has_address: bool => true
10
11
init(
12
type: Type
13
) is
14
super.init()
15
16
self.type = type
17
si
18
19
accept(visitor: Visitor) is
20
visitor.visit(self)
21
si
22
23
accept_address(visitor: Visitor) is
24
visitor.visit_address(self)
25
si
26
27
to_string() -> string =>
28
"default:[{type}]()"
29
si
30
si