Don't mangled functions annotated with @JvmName.
Annotate 'Result.success' and 'Result.failure' with @JvmName and
@Suppress("INAPPLICABLE_JVM_NAME").
NB this would require bootstrap.
- Don't produce mapping for closing bracket in case of expressionBody
- Map Kt*Function declaration into corresponding js fun declaration
- Update test data & add new test
Before this change we set JsSwitch source to subject's JsExpression.
We ignore these types of source elements during:
1. js ast serialization (see 'JsAstSerializer.extractLocation');
2. source map generation (see 'SourceMapBuilderConsumer.addMapping').
However we might add indent during source generation
(see 'JsToStringGenerationVisitor.pushSourceInfo').
That seemingly broken 'testEnumEntryRemoved' in
'IncrementalJsCompilerRunnerTestGenerated.ClassHierarchyAffected',
because deserialized ast during incremental build would not
have source element at all (JsExpression was ignored), but ast
during rebuild would have JsExpression source element.
Use it for char boxing/unboxing and unit materialization.
Possible to use for other purposes, for example, to add type checks
to dynamics.
See KT-18793, KT-17915, KT-19081, KT-18216, KT-12970, KT-17014,
KT-13932, KT-13930
- elvis expression with complex RHS
- destructuring declarations
- decomposition of `var` statement (for example, in case of
inline destructuring functions)
- `is` LHS &&/|| inline fun RHS
- argument assignment to temporary var on inline call site
- assignment of `next()` result to temporary var in `for` expression
- rethrow statement in exception handler
- refactor pipeline for generation of source map
- generate "empty" mappings for nodes that impossible
to map to something reasonable
- generate more accurate locations in source maps for specific
JS AST nodes
- for binary operation nodes parser now returns location
of binary operator tokens instead of location of first operand
- change completely how source map remapper works