Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
I hit these compiling angular.

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/992973002
  • Loading branch information
vsmenon committed Mar 10, 2015
1 parent 74476b5 commit 135c1e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/dev_compiler/lib/src/codegen/js_codegen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1241,6 +1241,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {

JS.Expression _emitPrefixIncrement(Token op, Expression expr) {
var one = AstBuilder.integerLiteral(1);
one.staticType = rules.provider.intType;
var increment = AstBuilder.binaryExpression(expr, op.lexeme[0], one);
return _emitAssignment(expr, increment);
}
Expand Down Expand Up @@ -1516,7 +1517,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
}

var catchVarDecl = new JS.VariableDeclaration(_catchParameter);
var catchBody = _statement(_visitList(clauses));
var catchBody = new JS.Block(_visitList(clauses));
_catchParameter = savedCatch;

return new JS.Catch(catchVarDecl, catchBody);
Expand Down

0 comments on commit 135c1e5

Please sign in to comment.