mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
Handle zero-size structs
This commit is contained in:
parent
8eb74da0f3
commit
27af5897d1
2 changed files with 20 additions and 6 deletions
|
@ -50,6 +50,15 @@ impl BlockType {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<Option<ValueType>> for BlockType {
|
||||
fn from(opt: Option<ValueType>) -> Self {
|
||||
match opt {
|
||||
Some(ty) => BlockType::Value(ty),
|
||||
None => BlockType::NoResult,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A control block in our model of the VM
|
||||
/// Child blocks cannot "see" values from their parent block
|
||||
struct VmBlock<'a> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue