Commit Graph

5300 Commits

Author SHA1 Message Date
Mikhail Bogdanov 9c0b96af71 Report error on missed specialization in compatibility mode
#KT-39603 Fixed
2020-06-19 11:57:36 +02:00
Abduqodiri Qurbonzoda 194791a168 Introduce minByOrNull and maxByOrNull extension functions #KT-38854 2020-06-19 04:53:51 +03:00
Victor Petukhov ece61915de NI: clean calls in coroutine inference before the second analysis of += only for right side
^KT-39660 Fixed
2020-06-18 17:09:59 +03:00
Igor Chevdar 3634ad2d54 Added a test 2020-06-18 12:44:48 +05:00
Steven Schäfer 03651f1dd4 IR: Fix inner class type parameters in IrTypeSystemContext 2020-06-17 22:10:00 +03:00
Ilya Gorbunov 2fe222e8e7 Add SKIP_DCE_DRIVEN directive in JS-IR tests
Otherwise they fail with a compiler exception:
"An operation is not implemented: SAM conversion"
2020-06-17 19:45:15 +03:00
Victor Petukhov 447308dcfc Revert "Revert "Revert "Completely rewrite reifiedIntTypeAnalysis, making it more streamline"""
This reverts commit 5567033b
2020-06-17 13:02:40 +03:00
Ilmir Usmanov 1cccceabb9 Revert "Fix merging two reference values"
This reverts commit 85e2392f
2020-06-17 13:02:40 +03:00
Anton Bannykh cbabb4f76a JS stdlib api test: various changes
- Setting -Doverwrite.output=true updates gold data
- Big packages don't get split into chunks
- Unique lines in the API are marked with /*∆*/ and diff test is removed
- Annotations on separate lines and other dump format tweaks
- Test data moved to libraries/stdlib/api/
- Minor visibility fix to Enum members
2020-06-15 11:49:15 +03:00
Vyacheslav Gerasimov b4df4e5525 Build: Fix variant resolution ambiguity 2020-06-14 20:31:27 +03:00
Igor Chevdar 8b37a094fe Added a test on possible name clash for SAM wrappers 2020-06-11 23:00:36 +05:00
Alexander Udalov 6e67e1e78d Replace appendln with appendLine in project 2020-06-11 13:01:30 +02:00
Mikhail Zarechenskiy 3921a0ed70 Add test for obsolete issue
#KT-17341 Obsolete
 #KT-32958 Obsolete
2020-06-10 16:00:23 +03:00
Ilmir Usmanov 85e2392fef Fix merging two reference values
In this case, make the result of value type Object instead of unknown.
2020-06-09 20:52:29 +02:00
Ilmir Usmanov 5567033b33 Revert "Revert "Completely rewrite reifiedIntTypeAnalysis, making it more streamline""
This reverts commit 822c14814b.
2020-06-09 20:52:24 +02:00
Alexander Udalov fc1217ba07 Generate delegates to DefaultImpls in fun interface wrappers
#KT-37436 Fixed
2020-06-09 11:44:31 +02:00
Alexander Udalov 2793187bda Handle IllegalArgumentException in trimMargin intrinsics on JVM
#KT-38537 Fixed
2020-06-09 11:11:06 +02:00
Vladimir Dolzhenko 9319c4c96e DryRun mode for GenerateTests is added
Relates to #KTI-17
2020-06-08 19:05:10 +00:00
Anton Bannykh bd2a0563ad JS: fix explicit cross-module SAM constructor calls 2020-06-06 13:20:37 +03:00
Ilmir Usmanov f0006f2405 Minor. Add regression test
#KT-39374 Fixed
2020-06-05 21:30:24 +02:00
Mikhail Zarechenskiy 718f23b34f Compatibility warning for references to companion via name (KT-13934) 2020-06-05 13:24:18 +03:00
Ilmir Usmanov 8cc5f2abfb Forbid val field initialization inside EXACLTY_ONCE lambda
unless the lambda is inline. This way, final field will remain final.
2020-06-04 21:26:48 +02:00
Dmitry Petrov de25359a90 Fix stdlib compilation after updated @JvmName check
Previously, extension receiver type was not taken into account when
checking for @JvmName annotation applicability to possibly mangled
functions (such functions, however, were mangled).
This bug was fixed, but, unfortunately, not before such functions were
added to stdlib ('sumOf' family).
2020-06-04 12:16:28 +03:00
Dmitry Petrov 202bbdf8dd Forward compatibility hacks for Result.{success, failure}
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.
2020-06-04 12:16:27 +03:00
Ilmir Usmanov 822c14814b Revert "Completely rewrite reifiedIntTypeAnalysis, making it more streamline"
This reverts commit 1ed4324613.

Otherwise, bootstrap is broken.
2020-06-03 19:43:59 +02:00
Anton Bannykh a18bfad53a Add stdlib API test + remove some extra IR stdlib API's 2020-06-03 17:14:29 +03:00
Ilmir Usmanov 1ed4324613 Completely rewrite reifiedIntTypeAnalysis, making it more streamline
and easy to understand and optimize if it would be a bottleneck.
Use LVT to get information of refined int type in one specific case

 #KT-38925 Fixed
2020-06-03 16:03:50 +02:00
Svyatoslav Kuzmich b0445496bb [JS] Autogenerate and mute missing test 2020-06-03 15:19:36 +03:00
Roman Artemev 5eae262264 [PLUGIN API] Implement custom linkage for plugin extensions 2020-06-03 12:17:14 +03:00
Svyatoslav Kuzmich e9e850ad8f [JS IR] Fix findInterfaceImplementation
isOrOverridesSynthesized uses descriptors which does not work with
wrapped descriptors
2020-06-03 10:47:15 +03:00
Svyatoslav Kuzmich f8fdb0dc7e [JS] Add ; after functions in .d.ts
Fixes nit from KT-37752
2020-06-03 10:33:46 +03:00
Svyatoslav Kuzmich 2ca751a9fc [JS] Prevent default class constructors in d.ts files.
Generate private TypeScript constructor for classes without public
primary Kotlin constructor.
2020-06-03 10:33:45 +03:00
Svyatoslav Kuzmich 695d383ed1 [JS] Support secondary constructors in JsExport 2020-06-03 10:33:45 +03:00
Dmitry Petrov 16f175612e KT-31908 Handle SAM conversion on vararg elements 2020-06-02 23:53:47 +03:00
Leonid Startsev 7c8c5b057f Extensible mechanism for plugin metadata during descriptor serialization
A mechanism that allows kotlinx.serialization plugin to preserve the
correct (program) order of properties after serializing/deserializing
descriptors to kotlin metadata, which is needed for correct and stable
json serialization of class hierarchies in incremental/multi-module scenario.
It uses protobuf extensions.
2020-06-01 17:48:16 +03:00
Alexander Udalov 7d9fe55072 Regenerate tests 2020-05-29 15:15:43 +02:00
pyos 35460fed19 JVM_IR: fix a bug when isInlineParameter is applied to default stubs
If an inline parameter has a default value, its type is nullable.
There's already code to handle this in `IrInlineCodegen`, but it
really should be in `isInlineParameter` instead, otherwise e.g.
SyntheticAccessorLowering fails.
2020-05-29 10:04:36 +02:00
Ilmir Usmanov 5f3e296f19 Fix bugs with capturing rhs into EXACTLY_ONCE lambda
There are multiple ways to declare a named variable-like entity in
Kotlin:
1. val/var variable declaration
2. destructuring declaration
3. parameter of a function
4. parameter of a lambda
5. destructured lambda parameter
6. for-loop's variable declaration
7. catch block exception declaration
8. val in when
9. field declaration

Out of them, only variable and field can be assignable, in other words,
they can be on the left hand side of an assignment.
Val/var variable declarations were already supported.
So, we needed to just support field initialization and tell the backend
that other ways are prohibited. Function and lambda parameters were
already been supported. So, the only thing to explain to the backend are
remaining ways.
 #KT-39113 Fixed
 #KT-34048 Fixed
2020-05-29 09:55:04 +02:00
Dmitry Petrov a270ee094c Language feature for new inline class mangling rules (since 1.4) 2020-05-29 00:53:01 +03:00
Zalim Bashorov 7f41dc4828 Add more detailed message for EA-227305 and EA-226744 2020-05-28 21:38:00 +03:00
Alexander Udalov d115a1ff9c Minor, fix some warnings such as "unused main argument" in generators 2020-05-27 23:29:21 +02:00
Roman Artemev 500acf412f [JS TESTS] Regenerate ES6 tests 2020-05-27 00:32:56 +03:00
Roman Artemev 2fd6921806 [JS TESTS] Emulate failing of non-run tests 2020-05-27 00:32:56 +03:00
Roman Artemev 086241659e [JS TESTS] Don't run ES6 test on win & mac till j2v8 issue is fixed. 2020-05-27 00:32:56 +03:00
Roman Artemev 50162265da [JS TESTS] Add EP to disable run test on specific platform 2020-05-27 00:32:56 +03:00
Vitaly fe047f9b47 [JS BE] mutes tests for JS_IR_ES6, which muted for JS_IR 2020-05-27 00:32:56 +03:00
Vitaly fe65045615 [JS BE] add es6 BE and relevant generated tests 2020-05-27 00:32:56 +03:00
Vitaly a231b21c69 [JS BE] add tests for es6-classes 2020-05-27 00:32:55 +03:00
Vitaly 18bd80eb29 [JS BE] add JsClass node to ast 2020-05-27 00:32:54 +03:00
Zalim Bashorov f39165bb58 Revert accidentally pushed changes
Revert "~~~"

This reverts commit 03fcbfad

Revert "Add an ability to provide own handler for errors inside KotlinJavascriptMetadataUtils.loadMetadata"

This reverts commit 69827fc5

Revert "Add more detailed message for EA-227305 and EA-226744"

This reverts commit b79b3507
2020-05-26 16:15:59 +03:00