Add support getter and setter for static props

This commit is contained in:
Satoshi Amemiya 2018-07-03 20:52:43 +09:00
parent bc2eab1434
commit e6b2a0d98c

View File

@ -1817,8 +1817,9 @@ impl<'a, 'b> SubContext<'a, 'b> {
if import.structural { if import.structural {
format!( format!(
"function() {{ "function() {{
return this.{}; return {}.{};
}}", }}",
if is_static { &class } else { "this" },
g g
) )
} else { } else {
@ -1835,8 +1836,9 @@ impl<'a, 'b> SubContext<'a, 'b> {
if import.structural { if import.structural {
format!( format!(
"function(y) {{ "function(y) {{
this.{} = y; {}.{} = y;
}}", }}",
if is_static { &class } else { "this" },
s s
) )
} else { } else {