From 0f8a720fe869b99817a15d163a883a9875f9570e Mon Sep 17 00:00:00 2001 From: Jakub Doka Date: Sun, 13 Oct 2024 16:38:51 +0200 Subject: [PATCH] wrong handling of embeds --- lang/src/codegen.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/src/codegen.rs b/lang/src/codegen.rs index 3dde4486..5a1183ef 100644 --- a/lang/src/codegen.rs +++ b/lang/src/codegen.rs @@ -801,7 +801,7 @@ impl Codegen { use {Expr as E, TokenKind as T}; let value = match *expr { E::Mod { id, .. } => Some(Value::ty(ty::Kind::Module(id).compress())), - E::Embed { id, .. } => Some(Value::ty(ty::Kind::Global(id).compress())), + E::Embed { id, .. } => self.handle_global(id), E::Struct { captured, packed, fields, pos, .. } => { if captured.is_empty() { Some(Value::ty(