Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$tmpl error message improvement #16127

Open
Tracked by #16156
ghost opened this issue Oct 20, 2022 · 1 comment
Open
Tracked by #16156

$tmpl error message improvement #16127

ghost opened this issue Oct 20, 2022 · 1 comment
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@ghost
Copy link

ghost commented Oct 20, 2022

V version: 0.3.1 f8a28b5
OS: ArchLinux

What did you do?

template.txt

@name
fn foo(){
	name := 'abc'
	$tmpl('template.txt')
}

fn bar(){
	$tmpl('template.txt')
}

fn main(){
}

What did you expect to see?
Line number both in V file and template file.

What did you see instead?
Only template file line number.

> v run .
template.txt:9:32: error: undefined ident: `name`
@ghost ghost added the Bug This tag is applied to issues which reports bugs. label Oct 20, 2022
@ghost ghost changed the title '$tmpl' error message improvement $tmpl error message improvement Oct 20, 2022
@bogen85
Copy link
Member

bogen85 commented Oct 22, 2022

There are other confusing error message for $tmpl. See #16154

@ghost ghost mentioned this issue Oct 23, 2022
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

No branches or pull requests

1 participant