make types.check public
parent
d27c5eb345
commit
fc5f4ff326
|
@ -191,7 +191,9 @@ fn (p mut Parser) print_error_context() {
|
|||
|
||||
fn normalized_error(s string) string {
|
||||
// Print `[]int` instead of `array_int` in errors
|
||||
mut res := s.replace('array_', '[]').replace('__', '.').replace('Option_', '?').replace('main.', '').replace('ptr_', '&')
|
||||
mut res := s.replace('array_', '[]').replace('__', '.')
|
||||
.replace('Option_', '?').replace('main.', '').replace('ptr_', '&')
|
||||
.replace('_dot_', '.')
|
||||
if res.contains('_V_MulRet_') {
|
||||
res = res.replace('_V_MulRet_', '(').replace('_V_', ', ')
|
||||
res = res[..res.len - 1] + ')"'
|
||||
|
|
|
@ -16,7 +16,7 @@ pub const (
|
|||
)
|
||||
|
||||
|
||||
fn check(got, expected &Type) bool {
|
||||
pub fn check(got, expected &Type) bool {
|
||||
if got.idx != expected.idx {
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue