Skip to content

Commit

Permalink
Fix FromVarian codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
jac3km4 committed Feb 9, 2021
1 parent e7d9cdd commit bc66cea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/assembler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ impl Assembler {
}
(IntrinsicOp::FromVariant, _) => {
let expected = scope.resolve_type(&TypeName::VARIANT, pool, pos)?;
self.emit(Instr::ToVariant(type_idx));
self.emit(Instr::FromVariant(type_idx));
self.compile_with_conversion(&args[0], &expected, pool, scope, pos)
}
(IntrinsicOp::AsRef, _) => {
Expand Down

0 comments on commit bc66cea

Please sign in to comment.