pr 22
This commit is contained in:
@@ -116,13 +116,14 @@ fn lower_type(ty: &ir_core::Type) -> ir_vm::Type {
|
||||
ir_core::Type::Float => ir_vm::Type::Float,
|
||||
ir_core::Type::Bool => ir_vm::Type::Bool,
|
||||
ir_core::Type::String => ir_vm::Type::String,
|
||||
ir_core::Type::Optional(inner) => ir_vm::Type::Array(Box::new(lower_type(inner))), // Approximation
|
||||
ir_core::Type::Result(ok, _) => lower_type(ok), // Approximation
|
||||
ir_core::Type::Struct(_) => ir_vm::Type::Object,
|
||||
ir_core::Type::Service(_) => ir_vm::Type::Object,
|
||||
ir_core::Type::Contract(_) => ir_vm::Type::Object,
|
||||
ir_core::Type::ErrorType(_) => ir_vm::Type::Object,
|
||||
ir_core::Type::Optional(inner) => ir_vm::Type::Array(Box::new(lower_type(inner))),
|
||||
ir_core::Type::Result(ok, _) => lower_type(ok),
|
||||
ir_core::Type::Struct(_)
|
||||
| ir_core::Type::Service(_)
|
||||
| ir_core::Type::Contract(_)
|
||||
| ir_core::Type::ErrorType(_) => ir_vm::Type::Object,
|
||||
ir_core::Type::Function { .. } => ir_vm::Type::Function,
|
||||
ir_core::Type::Array(inner, _) => ir_vm::Type::Array(Box::new(lower_type(inner))),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user