We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
@[has_globals]
@[wasm_import_namespace]
1 parent 0eb41e5 commit f8b70b7Copy full SHA for f8b70b7
vlib/v/parser/parser.v
@@ -3716,19 +3716,14 @@ fn (mut p Parser) module_decl() ast.Module {
3716
p.is_generated = true
3717
}
3718
'has_globals' {
3719
- if p.inside_vlib_file {
3720
- p.has_globals = true
3721
- } else {
3722
- p.error_with_pos('[has_globals] is allowed only in .v files of `vlib` modules',
3723
- ma.pos)
3724
- }
+ p.has_globals = true
3725
3726
'translated' {
3727
p.is_translated = true
3728
3729
'wasm_import_namespace' {
3730
if !p.pref.is_fmt && p.pref.backend != .wasm {
3731
- p.error_with_pos('[wasm_import_namespace] is allowed only in the wasm backend',
+ p.note_with_pos('@[wasm_import_namespace] is only supported by the wasm backend',
3732
ma.pos)
3733
3734
0 commit comments