Remove str_type

This commit is contained in:
Ayaz Hafiz 2022-11-09 09:25:25 -06:00
parent f1180a1549
commit c66a0f53c6
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 1 additions and 10 deletions

View file

@ -267,11 +267,6 @@ pub fn list_type(typ: Type) -> Type {
builtin_type(Symbol::LIST_LIST, vec![typ])
}
#[cfg_attr(not(debug_assertions), inline(always))]
pub fn str_type() -> Type {
builtin_type(Symbol::STR_STR, Vec::new())
}
#[cfg_attr(not(debug_assertions), inline(always))]
fn builtin_num_alias(
symbol: Symbol,

View file

@ -358,11 +358,7 @@ pub fn constrain_pattern(
}
StrLiteral(_) => {
// TODO(types-soa) use Types::STR
let str_type = {
let typ = types.from_old_type(&builtins::str_type());
constraints.push_type(types, typ)
};
let str_type = constraints.push_type(types, Types::STR);
state.constraints.push(constraints.equal_pattern_types(
str_type,
expected,