Use double underscores for consistency
This commit is contained in:
parent
a9a067f5a9
commit
91e1f33b6c
@ -158,7 +158,7 @@ impl Visitor {
|
||||
}
|
||||
};
|
||||
|
||||
let tmp = format_ident!("_{ident}");
|
||||
let tmp = format_ident!("__{ident}");
|
||||
let span = cast.span();
|
||||
*expr = match ty {
|
||||
LuaType::Any => parse_quote_spanned!(span => {}),
|
||||
|
@ -81,7 +81,7 @@ fn local_fn() {
|
||||
fn check(self: string, arg: number) {}
|
||||
inner
|
||||
}),
|
||||
r#"function()local function check(self,arg)do if type(self)=="number"then self=tostring(self);else assert(type(self)=="string","string expected in \'self\', got "..type(self));end;end;do local _arg=arg;arg=tonumber(arg);assert(arg~=nil,"number expected in \'arg\', got "..type(_arg));end;end;return inner;end"#
|
||||
r#"function()local function check(self,arg)do if type(self)=="number"then self=tostring(self);else assert(type(self)=="string","string expected in \'self\', got "..type(self));end;end;do local __arg=arg;arg=tonumber(arg);assert(arg~=nil,"number expected in \'arg\', got "..type(__arg));end;end;return inner;end"#
|
||||
);
|
||||
}
|
||||
|
||||
@ -220,7 +220,7 @@ fn type_checks() {
|
||||
);
|
||||
assert_eq!(
|
||||
luaify!(|s| { s as number }),
|
||||
r#"function(s)do local _s=s;s=tonumber(s);assert(s~=nil,"number expected in \'s\', got "..type(_s));end;end"#
|
||||
r#"function(s)do local __s=s;s=tonumber(s);assert(s~=nil,"number expected in \'s\', got "..type(__s));end;end"#
|
||||
);
|
||||
assert_eq!(
|
||||
luaify!(|s| { s as nil }),
|
||||
|
Loading…
x
Reference in New Issue
Block a user