Commit Graph

62026 Commits

Author SHA1 Message Date
Pavel Kirpichenkov 2ead2fba08 [IDEA-TESTS] Update quickfix test parameters for 1.4
Tests check language feature `ProhibitVarargAsArrayAfterSamArgument`
2020-02-18 11:19:18 +03:00
Mikhail Glukhikh fdf4f477a6 FIR2IR: fix problems with enum entry / anonymous object visibility 2020-02-18 10:50:03 +03:00
Ilya Goncharov 9f0ef77531 [Gradle, JS] Provide js compilations parameters to link tasks
#KT-36796 fixed
2020-02-18 09:35:36 +03:00
Abduqodiri Qurbonzoda ce8e511b79 Add setOfNotNull function #KT-35851 2020-02-18 02:33:59 +03:00
Abduqodiri Qurbonzoda 5a4ce2aa4c Mark shared global vals to fix K/N worker thread crash 2020-02-18 01:49:24 +03:00
Dmitry Petrov 94d20d9176 Update bytecode text tests in JVM_IR 2020-02-17 23:52:48 +03:00
Mark Punzalan 64141b8b38 [JVM IR] Fix issue where fields are not being set to their default
values within initializer blocks.

The issue occurs in code like this:
```
class C {
  var b = true
  init {
    b = false   // Missing PUTFIELD for this statement
  }
}
```

Added a new statement origin for field initialization (at declaration)
instead of relying on `origin == null` in ExpressionCodegen to determine
whether to generate the initializations.

This was unintentionally broken in
d68a1898d0.
2020-02-17 23:04:11 +03:00
Mikhail Glukhikh 56c819f06e FIR2IR: add two-statements block with iterator + while for 'for' loops
Before this commit we had two statements blocks for 'for' loops:
range variable declaration + iterator variable declaration + while loop.
However, BE requires a bit different loop structure to make lowerings
properly so in this commit iterator declaration & while loop were
extracted to separate block.
2020-02-17 20:35:17 +03:00
Mikhail Glukhikh 2bfce4f127 FIR2IR: provide correct origins for 'for' loops 2020-02-17 20:35:17 +03:00
Mikhail Glukhikh 83e68be2dc FIR2IR: add declarations to all library classes from kotlin.* package
Before this commit, all library classes were just stubs.
This commit helps to solve problems with some functions
indirectly used by BE, like IntProgression.first.
2020-02-17 20:35:17 +03:00
Mikhail Glukhikh 4a4fb5a590 Raw FIR: eliminate range variable declaration in 'for' loops 2020-02-17 20:35:17 +03:00
Mikhail Glukhikh 4abbcd1267 Unmute two passing FIR black box tests (fixed by commits of demiurg) 2020-02-17 20:35:16 +03:00
Mikhail Glukhikh 91814364de Mute two failing FIR black box tests (broken by commits of demiurg) 2020-02-17 20:35:16 +03:00
Dmitry Savvinov baa2c56e2d Force-set path to exact project for MPP run configurations
Otherwise, path will be set to the root project. Given that we provide
task names in relative form rather than absolute, that will lead to
launching this task in all subprojects (e.g. task 'jvmTest'). This might
be a huge issue, because when we create run configuration for specific
test method/class, we pass test filter as well. This test filter will
execute in all projects with matched test tasks, so if some other
subproject has similarly-named test task, but doesn't have a suitable
tests for that filter, the whole build will fail.

Note that the ideal fix would involve using fully-qualified task names:
the current approach might lead to isses in advanced scenarious (e.g.
when user selects several test files from different modules -- then, we
won't be able to find one exact project path for the whole test run)

^KT-35038 Fixed
2020-02-17 20:05:50 +03:00
Dmitry Savvinov cc2884b8ae Add test on multiplatform run configurations in multiproject build
The current behaviour is undesired, see next commit for fix
2020-02-17 20:05:50 +03:00
Dmitry Savvinov 1ea3db90e1 Add ability to render project of run configuration in tests 2020-02-17 20:05:50 +03:00
Victor Petukhov 51edf2b351 NI: introduce warning about implicitly inferred Nothing with existing non-Nothing expected type
^KT-35406 Fixed
2020-02-17 19:43:05 +03:00
Jinseong Jeon e3184e407d KT-20844 Re-enable stack spilling during inline.
`dx` has entered the final stage of sunset:
https://android-developers.googleblog.com/2020/02/the-path-to-dx-deprecation.html
2020-02-17 15:44:48 +01:00
Vladimir Dolzhenko c9ed27e674 KT-36685 "Convert to a range check" transform hex range to int if it is compared with "Less" or "Greater"
#KT-36685 Fixed
2020-02-17 14:43:37 +01:00
Dmitriy Novozhilov 811ed1ade4 [FIR] Don't update expression in receiver value with smartcast in candidate factory 2020-02-17 14:45:44 +03:00
Dmitriy Novozhilov e302e06c73 [FIR-TEST] Add test with nullability annotation problem
#KT-36770
2020-02-17 14:45:44 +03:00
Dmitriy Novozhilov 47d5bbc224 [FIR-TEST] Move fixed tests out problems directory 2020-02-17 14:45:44 +03:00
Dmitriy Novozhilov e67c8a55bf [FIR-TEST] Add test with callable reference to member of local class
#KT-36758
2020-02-17 14:45:44 +03:00
Dmitriy Novozhilov d10e56c358 [FIR] Add mapping of primitive types to JVM signatures 2020-02-17 14:45:43 +03:00
Mikhael Bogdanov 031952268a Minor. Disable test on Android 2020-02-17 12:03:08 +01:00
Alexey Tsvetkov ee2e40ce6b Regenerate test 2020-02-17 13:14:04 +03:00
Mikhail Zarechenskiy 70d416cafd Remove test that become useless after enabling NI everywhere
It checked that with default settings new inference is enabled in IDE
 and SAM conversions are _disabled_. Now this is useless as NI is
 enabled everywhere
2020-02-17 12:38:22 +03:00
Mikhail Zarechenskiy dfe23e770c Update test about lookups for SAMs after enabling NI
In NI we don't perform lookup if argument is obviously can't be
 adapted by SAM conversion (and here there is no argument at all)
2020-02-17 12:38:21 +03:00
Igor Chevdar 297d296b62 [JS] Respect SKIP_DCE_DRIVEN in tests 2020-02-17 12:21:00 +03:00
Igor Chevdar 9bc7a43991 [IR] [JS_IR] Supported fun interfaces in JS 2020-02-17 12:21:00 +03:00
Pavel Kirpichenkov 4a7b4d655c [NI] Fix completion for ILT when Nothing constraint is present
Full completion should not be done if lower `Nothing`
is the only proper constraint when constraint with ILT type is present.
ILT will be selected as a resulting type and transformed into `Int`
without attention to possible restrictions from outer calls.
2020-02-17 12:02:51 +03:00
Sergey Bogolepov 208c06516b [IR][Serialization] Allow backends to skip files
This change is required for Native interop libraries.
For enums and structs we generate full-blown IR classes that should not
be serialized because they will be generated anew.
2020-02-17 16:00:37 +07:00
Natalia Selezneva bcf6ee0c0b KotlinDslScriptsModel: pass provider mode properly 2020-02-17 11:44:50 +03:00
Natalia Selezneva ed6f13cf56 KotlinDslScriptsModel: do not add prepare task for each gradle task invocation
^KT-36090 Fixed
2020-02-17 11:44:50 +03:00
Natalia Selezneva e40dc37be8 KotlinDslScriptsModel: pass correlationId during the request
^KT-36200 Fixed
2020-02-17 11:42:21 +03:00
Pavel Kirpichenkov 55b836a0ac Mute light class tests
Muted test failures are stable with LV 1.4
Related ticket KT-36717
2020-02-17 10:56:46 +03:00
Pavel Kirpichenkov fda8d7de8b [IDEA-TESTS] Specify language version in feature-dependent tests
Some quickfixes are relying on diagnostics, that won't be reported
with new language features enabled.
`MixedNamedArgumentsInTheirOwnPosition`
`AllowBreakAndContinueInsideWhen`
2020-02-17 10:56:46 +03:00
Pavel Kirpichenkov 85d7a0f6b1 [IDEA-TESTS] Fix ReplaceProtectedToPublishedApiCallFix
Register error factory in addition to warning factory
2020-02-17 10:56:46 +03:00
Pavel Kirpichenkov 05b00a1302 [JPS-TEST] Update deprecated language version in test 2020-02-17 10:56:46 +03:00
Pavel Kirpichenkov bd3b23b933 Use LATEST_STABLE version during prerelease in VersionView
^KT-36644 Fixed
2020-02-17 10:56:41 +03:00
Mikhail Zarechenskiy f9129332b7 [NI] Minor optimisation: don't call extra contains checks 2020-02-17 10:29:47 +03:00
Mikhail Zarechenskiy 724bb1b134 [NI] Force variable substitution for properties with stub types 2020-02-17 10:29:46 +03:00
Mikhail Zarechenskiy 155b716e7e Revert "Disable NewInference for stdlib tests"
This reverts commit cdf5323f8c.
2020-02-17 10:29:46 +03:00
Mikhail Zarechenskiy 18b218bfa8 [NI] Use projected type for constraint like Cap(out A) <: out @Exact T
This is an implicit semantics of Exact annotation
2020-02-17 10:29:46 +03:00
Mikhail Zarechenskiy 3cf77d29b5 Unmute test for NI
It was fixed in 7f6c03c9
2020-02-17 10:29:45 +03:00
Mikhail Zarechenskiy 4542f3b720 [NI] Finish analysis for coerced last lambda expressions if needed 2020-02-17 10:29:45 +03:00
Mikhail Zarechenskiy 220bf6d62f [NI] Update test data 2020-02-16 23:49:50 +03:00
Roman Golyshev 3461effd47 KT-33372 Remove renaming file reference to the contents of the file
- There is still a hack with returning null from `getLastFileReference`,
it is here to keep KT-25674 issue fixed
- Overrides of `bindToElement` are removed, they caused renames of the
file references to their contents
- Code of `KotlinFilePathReferenceContributor.kt` is refactored
- ^KT-33372 ^KT-32514 ^KT-36306 Fixed
2020-02-16 17:08:11 +03:00
Toshiaki Kameyama 7f2cf571b0 Convert to range check: do not transform binaries/hexadecimals to decimals
#KT-36685 Fixed
2020-02-16 15:56:44 +09:00
Steven Schäfer 50c477bee1 Update IR text test expectations for FIR 2020-02-15 22:38:10 +03:00