Cephelapod-compiled Kalypso will compile Kalypso, but the result segfaults
This commit is contained in:
@@ -138,10 +138,15 @@ obj type (Object) {
|
||||
return base == other.base && deref_equality(return_type, other.return_type) &&
|
||||
indirection == other.indirection && deref_equality(type_def, other.type_def) && traits == other.traits
|
||||
}
|
||||
fun to_string(): string {
|
||||
var trait_string = string(":[")
|
||||
traits.for_each(fun(t: string) trait_string += t;)
|
||||
trait_string += "] "
|
||||
fun to_string(): string return to_string(true);
|
||||
fun to_string(include_traits: bool): string {
|
||||
var trait_string = string()
|
||||
if (include_traits) {
|
||||
trait_string = string(":[")
|
||||
traits.for_each(fun(t: string) trait_string += t;)
|
||||
trait_string += "] "
|
||||
}
|
||||
|
||||
var indr_string = string("")
|
||||
if (is_ref)
|
||||
indr_string += " ref "
|
||||
@@ -221,5 +226,17 @@ obj type (Object) {
|
||||
}
|
||||
return false
|
||||
}
|
||||
fun is_none(): bool {
|
||||
match (base) {
|
||||
base_type::none() return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
fun is_template_type(): bool {
|
||||
match (base) {
|
||||
base_type::template_type() return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user