Natalia Selezneva
ba7d66eb4b
Fix 'Invalid file' Exception during script definition search (EA-125840)
...
EA-125840 - assert: FileManagerImpl.findFile
2019-05-08 15:17:12 +03:00
Natalia Selezneva
836006b3f3
Do not use canonical paths in OutsidersPsiFileSupportUtils (EA-135551)
...
EA-135551 - IOE: OutsidersPsiFileSupportUtils$getOutsiderFileOrigin$.invoke
2019-05-08 15:17:11 +03:00
Natalia Selezneva
98235952ad
Fix notification about highlighting for diff view in build.gradle.kts (KT-30638)
...
^KT-30638 Fixed
2019-05-08 15:17:11 +03:00
Natalia Selezneva
495d98f997
Fix highlighting for scripts in diff view (KT-30690)
...
^KT-30690 Fixed
2019-05-08 15:17:10 +03:00
Natalia Selezneva
88c6ecbbdf
Minor: extract common parts
2019-05-08 15:17:09 +03:00
Natalia Selezneva
89bf7f991a
Run indexes update after typing in script if needed
2019-05-08 15:17:09 +03:00
Natalia Selezneva
9e51f82248
Refactoring: add isApplicable method to ScriptDependenciesLoader
2019-05-08 15:17:08 +03:00
Natalia Selezneva
e990c61b55
Do not start script dependencies update if dependencies are already cached
2019-05-08 15:17:07 +03:00
Mikhail Zarechenskiy
516fccbe7b
[NI] Complete call if return type contains only "good" type variables
2019-05-08 12:19:52 +03:00
Mikhail Zarechenskiy
61bd3a8d03
[NI] Complete call if return type has proper lower or equal constraints
...
There was a silly bug: equal constraint is actually a lower and an upper
constraint, but we checked only presence of lower constraints.
Test is important as here we have one equal constraint and should
complete inner call `foo<Int>()` without propagating it to `bar` to
avoid using `NoInfer` annotation multiple times
2019-05-08 12:19:50 +03:00
Mikhail Zarechenskiy
6c9394f0b2
[NI] Use original implicit receiver for DSL violation check
...
There is an inconsistency between old and new inference for storing
receivers of resolved calls. In new inference, for captured types,
receiver will be changed and to preserve behavior of the old inference,
we use original one during important checks.
This is more a workaround than a solution and should be revisited.
#KT-31356 Fixed
#KT-29948 Fixed
#KT-31360 Fixed
2019-05-08 12:19:48 +03:00
Mikhail Zarechenskiy
c283e15425
[NI] Preserve annotations during type substitution
...
#KT-31346 Fixed
2019-05-08 11:26:20 +03:00
Ilya Gorbunov
2c26dc3af6
Add simplified overloads of String<->ByteArray/CharArray conversions
...
These overloads cover the most common cases of conversion of the entire
String or Byte/CharArray, avoiding extra index check and branching.
#KT-24810, KT-29265
2019-05-08 02:58:57 +03:00
Svyatoslav Kuzmich
f9c12db3b5
[JS IR] Unmute tests
2019-05-07 21:49:12 +03:00
Svyatoslav Kuzmich
e3bcabeae3
[JS IR] stdlib: Fix bugs in Long.toString(radix)
2019-05-07 21:49:12 +03:00
Svyatoslav Kuzmich
bc29a5b15c
[JS IR] stdlib: port methods that use bit representation of numbers
...
- Port part of 'misc.js' from current backend to 'bitUtils.kt' in IR backend
- Enable toBits, toRawBits, fromBits extension function on Double and Float
- Enable Double.withSign
- Refactor getNumberHashCode using new utils
2019-05-07 21:49:12 +03:00
Svyatoslav Kuzmich
362fbc8770
[JS IR] stdlib: Use comparator in CharArray.sort
...
CharArray is represented as a regular JS Array. Its default sort order is based
on string representation of elements.
2019-05-07 21:48:50 +03:00
Svyatoslav Kuzmich
179acf0789
[JS IR] stdlib: generate type-safe contentToString for primitive arrays
...
Avoid casting 'primitive' arrays to Array<*> because they fail on runtime
2019-05-07 21:48:50 +03:00
Svyatoslav Kuzmich
7687985442
[JS IR] Stdlib: use total-order comparasion for content equals
2019-05-07 21:48:50 +03:00
Svyatoslav Kuzmich
3a506a372b
[JS IR] stdlib: Use Nothing in return type of THROW helpers
...
Backend generated calls to those helpers inside expression which
resuleted in invalid type casts in IR (in dead code).
2019-05-07 21:48:50 +03:00
Nikolay Krasko
8c83beb086
Refactoring: drop unused AbstractKotlinReferenceContributor.kt
2019-05-07 16:12:25 +03:00
Nikolay Krasko
9b9bfe7ba3
Don't produce references for Kotlin block
2019-05-07 16:12:24 +03:00
Nikolay Krasko
78200dd38e
Get Kotlin references through Kotlin contributors only (KT-31129)
...
Speed up getting references and protect Kotlin from slow
references contributors.
#KT-31129 Fixed
2019-05-07 16:12:24 +03:00
Nikolay Krasko
b5918f4b5d
Minor: move KotlinDefaultAnnotationMethodImplicitReferenceContributor.kt
...
Need this move to reference contributor from reference provider service.
2019-05-07 16:12:24 +03:00
Mikhail Zarechenskiy
3506c2047a
Fix lint test: take into account diagnostic that is specific for NI
2019-05-07 15:56:15 +03:00
Mikhail Glukhikh
54411bd248
Simplifiable call: support case w/out receiver, add minor enhancements
...
Related to KT-30501
2019-05-07 14:28:20 +03:00
Mikhail Glukhikh
8328af5694
Apply "library call could be simplified" to idea + other style fixes
2019-05-07 14:28:20 +03:00
Mikhail Glukhikh
e934eba6e4
Simplifiable call inspection: add filter -> filterIsInstance replacement
...
#KT-30501 Fixed
2019-05-07 14:28:18 +03:00
Mikhail Glukhikh
7f1643cfad
Minor: simplify isCalling
2019-05-07 14:28:17 +03:00
Mikhail Glukhikh
8913755e11
Simplifiable call inspection: add filter -> filterNotNull replacement
...
Related to KT-30501
2019-05-07 14:28:17 +03:00
Mikhail Glukhikh
4a5cbe0443
Replace "flatMap -> flatten" inspection with abstract "simplifiable call"
...
Related to KT-30501
2019-05-07 14:28:16 +03:00
Nicolay Mitropolsky
6101b5e6ba
KotlinAnnotatedElementsSearcher made support Kotlin objects (KT-31332)
2019-05-07 09:26:00 +03:00
Svyatoslav Kuzmich
824c51e7f0
[JS IR] Add stdlib regression tests
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
0de1242f68
[JS IR BE] Unmute passed tests
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
331625a9bb
[JS IR BE] Lower kotlin.js.Json external interface methods
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
d6c9375196
[JS IR BE] Preserve package fqName when moving external declarations out
...
Create separate package fragment for each fqName of external declaration package
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
2741ecaaad
[JS IR BE] Materialize Unit object during upcasts in AutoBoxingTransformer
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
58bed0f932
[JS IR BE] Fix types of in secondary ctor lowering
...
Type of IrDelegatingConstructorCall is 'kotlin.Unit'
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
d6761d323c
[JS IR BE] Fix return targets inside state machine
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
feeb6e9862
[JS IR BE] Fix type for lowered cast expression
...
Safe cast result type is different from its type operand.
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
fc0a0f41d2
[JS IR BE] Fix: patch parents problems
...
* Patch parents for state machine builder
* Patch parents for declarations inside default value of actual parameter
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
130d2d00c3
[JS IR BE] Fix unboxing empty inline class varargs
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
0aae760469
[JS IR BE] Fix block decomposition lowering for dynamic expressions
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
17178628fb
[JS IR BE] Support bridges for special methods
...
Mostly reused from JVM IR lowering.
Shared logic moved to common backend module.
2019-05-06 19:34:25 +03:00
Mikhael Bogdanov
ec6904afd1
Minor. Fix test data
2019-05-06 17:34:02 +02:00
Mikhail Zarechenskiy
c1c464eeb5
Enable new type inference algorithm for IDE analysis
...
Note that this change doesn't affect compilation: if a project used
old inference, then it'll continue to use it.
To use old inference one can uncheck "Enable new type inference..."
option in "Kotlin Compiler" tab
2019-05-06 18:19:25 +03:00
Mikhail Zarechenskiy
1fecd15355
[NI] Fix exception on capturing stub type from coroutine-inference
...
#KT-30853 Fixed
2019-05-06 18:05:02 +03:00
pyos
90f11211d3
JVM_IR: wrap performInline in enterIntoInlining/exitFromInliningOf
2019-05-06 16:23:28 +02:00
Mikhail Zarechenskiy
931bbd8cec
[NI] Support ad-hoc implicit integer coercion for Kotlin/Native
2019-05-06 16:59:30 +03:00
Abduqodiri Qurbonzoda
c8a4fa58cd
Implement String to/from ByteArray conversion (KT-24810)
2019-05-06 15:54:28 +03:00