Skip to content

Commit c914951

Browse files
committed
Fix debug_value and debug_str macros
1 parent 3b615a6 commit c914951

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

src/emit/mod.rs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ macro_rules! debug_value {
386386
.to_owned();
387387
let label_expr = crate::codegen::Expression::BytesLiteral {
388388
loc: solang_parser::pt::Loc::Codegen,
389-
ty: Type::String,
389+
ty: crate::sema::ast::Type::String,
390390
value: string_literal.clone(),
391391
};
392392
let label_value = crate::emit::expression::expression(
@@ -402,7 +402,7 @@ macro_rules! debug_value {
402402
(
403403
crate::sema::ast::FormatArg::StringLiteral,
404404
Some(&string_literal),
405-
Type::String,
405+
crate::sema::ast::Type::String,
406406
label_value.into(),
407407
),
408408
(
@@ -415,7 +415,12 @@ macro_rules! debug_value {
415415
$function,
416416
);
417417

418-
$target.print($bin, $bin.vector_bytes(value), $bin.vector_len(value));
418+
<_ as crate::emit::TargetRuntime>::print(
419+
$target,
420+
$bin,
421+
$bin.vector_bytes(value),
422+
$bin.vector_len(value),
423+
);
419424

420425
value
421426
}};
@@ -428,7 +433,7 @@ macro_rules! debug_str {
428433
labeled_string.push_str($s);
429434
let expr = crate::codegen::Expression::BytesLiteral {
430435
loc: solang_parser::pt::Loc::Codegen,
431-
ty: Type::String,
436+
ty: crate::sema::ast::Type::String,
432437
value: labeled_string.as_bytes().to_owned(),
433438
};
434439
let value = crate::emit::expression::expression(
@@ -439,7 +444,12 @@ macro_rules! debug_str {
439444
$function,
440445
);
441446

442-
$target.print($bin, $bin.vector_bytes(value), $bin.vector_len(value));
447+
<_ as crate::emit::TargetRuntime>::print(
448+
$target,
449+
$bin,
450+
$bin.vector_bytes(value),
451+
$bin.vector_len(value),
452+
);
443453

444454
value
445455
}};

0 commit comments

Comments
 (0)