fix class extends expression (#1956)
This commit is contained in:
@@ -1474,10 +1474,20 @@ function OutputStream(options) {
|
||||
output.space();
|
||||
}
|
||||
if (self.extends) {
|
||||
var parens = self.extends instanceof AST_Binary ||
|
||||
self.extends instanceof AST_Conditional;
|
||||
output.print("extends");
|
||||
output.space();
|
||||
if (parens) {
|
||||
output.print("(");
|
||||
} else {
|
||||
output.space();
|
||||
}
|
||||
self.extends.print(output);
|
||||
output.space();
|
||||
if (parens) {
|
||||
output.print(")");
|
||||
} else {
|
||||
output.space();
|
||||
}
|
||||
}
|
||||
if (self.properties.length > 0) output.with_block(function(){
|
||||
self.properties.forEach(function(prop, i){
|
||||
|
||||
Reference in New Issue
Block a user