Prevent endless recursion when evaluating self-referencing consts

Fix #1041
This commit is contained in:
Richard van Velzen
2016-04-12 20:30:44 +02:00
parent 187a0caf9d
commit 4b4528ee05
2 changed files with 49 additions and 2 deletions

View File

@@ -0,0 +1,39 @@
const_declaration: {
options = {
evaluate: true
};
input: {
const goog = goog || {};
}
expect: {
const goog = goog || {};
}
}
const_pragma: {
options = {
evaluate: true
};
input: {
/** @const */ var goog = goog || {};
}
expect: {
var goog = goog || {};
}
}
// for completeness' sake
not_const: {
options = {
evaluate: true
};
input: {
var goog = goog || {};
}
expect: {
var goog = goog || {};
}
}