Skip to content

Commit

Permalink
fix(ssa refactor): Translate strings as arrays of characters (#1669)
Browse files Browse the repository at this point in the history
Translate strings as arrays of characters
  • Loading branch information
jfecher committed Jun 13, 2023
1 parent 1d48929 commit 2ba2ef6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/noirc_evaluator/src/ssa_refactor/ssa_gen/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ impl<'a> FunctionContext<'a> {
ast::Type::Integer(Signedness::Signed, bits) => Type::signed(*bits),
ast::Type::Integer(Signedness::Unsigned, bits) => Type::unsigned(*bits),
ast::Type::Bool => Type::unsigned(1),
ast::Type::String(_) => Type::Reference,
ast::Type::String(len) => Type::Array(Rc::new(vec![Type::char()]), *len as usize),
ast::Type::Unit => panic!("convert_non_tuple_type called on a unit type"),
ast::Type::Tuple(_) => panic!("convert_non_tuple_type called on a tuple: {typ}"),
ast::Type::Function(_, _) => Type::Function,
Expand Down

0 comments on commit 2ba2ef6

Please sign in to comment.