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