Remap source maps in JS DCE. Improve JS DCE error logging

See KT-19821
This commit is contained in:
Alexey Andreev
2017-08-25 15:38:01 +03:00
parent 1350e3c4ac
commit c66bc0b0e9
28 changed files with 196 additions and 42 deletions
@@ -92,7 +92,7 @@ class JsCallChecker(
val parserScope = JsFunctionScope(JsRootScope(JsProgram()), "<js fun>")
val statements = parse(code, errorReporter, parserScope, reportOn.containingFile?.name ?: "<unknown file>")
if (statements.isEmpty()) {
if (statements == null || statements.isEmpty()) {
context.trace.report(ErrorsJs.JSCODE_NO_JAVASCRIPT_PRODUCED.on(argument))
}
} catch (e: AbortParsingException) {