Browse Source

Merge pull request #342 from klaascuvelier/fix-infinite-recursion

Fix infinite recursion #341
gh-335
Oskar Segersvärd 9 years ago
parent
commit
326ea10641
  1. 1
      .gitignore
  2. 4
      src/Declaration.js

1
.gitignore

@ -5,3 +5,4 @@ dist
_actual _actual
coverage coverage
.commithash .commithash
.idea

4
src/Declaration.js

@ -19,6 +19,8 @@ export default class Declaration {
this.isReassigned = false; this.isReassigned = false;
this.aliases = []; this.aliases = [];
this.isUsed = false;
} }
addAlias ( declaration ) { addAlias ( declaration ) {
@ -53,6 +55,8 @@ export default class Declaration {
} }
use () { use () {
if ( this.isUsed ) return;
this.isUsed = true; this.isUsed = true;
if ( this.statement ) this.statement.mark(); if ( this.statement ) this.statement.mark();

Loading…
Cancel
Save