google / google/closure-compiler

Ungraceful error: Already found a mapping for inlining short name

Open
#1,964 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
7.7k
Forks
1.2k
Avg merge
2d 12h
Merged PRs (30d)
6

Description

``` js
goog.module('a');

const a = goog.require('a');
const a = goog.require('a');
```

Result:

```
java.lang.RuntimeException: INTERNAL COMPILER ERROR.
Please file a bug at http://go/jscompiler-bug with this stack trace, sponge link, and repro steps (a CL# and a build target).

Already found a mapping for inlining short name: a
Node(CALL): input0:4:10
const a = goog.require('a');
Parent(NAME a): input0:4:6
const a = goog.require('a');

at com.google.common.base.Preconditions.checkState(Preconditions.java:523)
at com.google.javascript.jscomp.ClosureRewriteModule.recordNameToInline(ClosureRewriteModule.java:1296)
at com.google.javascript.jscomp.ClosureRewriteModule.updateGoogRequire(ClosureRewriteModule.java:860)
```

https://closure-compiler-debugger.appspot.com/#input0%3Dgoog.module('a')%253B%250A%250Aconst%2520a%2520%253D%2520goog.require('a')%253B%250Aconst%2520a%2520%253D%2520goog.require('a')%253B%26input1%26conformanceConfig%26externs%26refasterjs-template%26includeDefaultExterns%3D1%26CHECK_SYMBOLS%3D1%26CHECK_TYPES%3D1%26CLOSURE_PASS%3D1%26LANG_IN_IS_ES6%3D1%26MISSING_PROPERTIES%3D1%26PRESERVE_TYPE_ANNOTATIONS%3D1%26PRETTY_PRINT%3D1%26TRANSPILE%3D1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.