| Tests the gutter decorations in target source code after ScriptFormatterEditorAction |
| |
| 0: + function outer(index) { |
| 1: |
| 2: - function inner1(a) { |
| 3: - return a + 1; |
| 4: - } |
| 5: |
| 6: + function inner2(a) { |
| 7: + return a + 2; |
| 8: + } |
| 9: |
| 10: - function inner3(a) { |
| 11: - return a + 3; |
| 12: - } |
| 13: + function inner4(a) { |
| 14: + return a + 4; |
| 15: + } |
| 16: - function inner5(a) { |
| 17: - return a + 5; |
| 18: - } |
| 19: |
| 20: + if (index === 7) { |
| 21: - console.error('This will never happen!'); |
| 22: - } |
| 23: |
| 24: + // Make sure these are not collected. |
| 25: + if (!self.__funcs) |
| 26: + self.__funcs = [inner1, inner2, inner3, inner4, inner5]; |
| 27: + return self.__funcs[index]; |
| 28: + } |
| 29: |
| 30: + function performActions() { |
| 31: + return outer(1)(0) + outer(3)(0); |
| 32: + } |
| 33: - function outer2() { |
| 34: - return outer(0)(0); |
| 35: - } |
| 36: |
| |