mirror of
https://github.com/vlang/v.git
synced 2025-09-10 07:47:20 -04:00
make types.check public
This commit is contained in:
parent
d27c5eb345
commit
fc5f4ff326
@ -191,7 +191,9 @@ fn (p mut Parser) print_error_context() {
|
|||||||
|
|
||||||
fn normalized_error(s string) string {
|
fn normalized_error(s string) string {
|
||||||
// Print `[]int` instead of `array_int` in errors
|
// 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_') {
|
if res.contains('_V_MulRet_') {
|
||||||
res = res.replace('_V_MulRet_', '(').replace('_V_', ', ')
|
res = res.replace('_V_MulRet_', '(').replace('_V_', ', ')
|
||||||
res = res[..res.len - 1] + ')"'
|
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 {
|
if got.idx != expected.idx {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user