Svyatoslav Kuzmich
43b4b6eaae
Add more specific fail messages in inline class box tests
2018-11-08 15:00:31 +03:00
Svyatoslav Kuzmich
370b04df35
[JS IR BE] Inline classes lowering
2018-11-08 15:00:30 +03:00
Svyatoslav Kuzmich
4866c2b36a
[IR] Move irCall from JS backend to common utils
2018-11-08 15:00:09 +03:00
Svyatoslav Kuzmich
81d61aefff
[IR] Specify IrType in irTemporary
2018-11-08 15:00:09 +03:00
Svyatoslav Kuzmich
dd20775662
[IR] Move IrFunction.isStatic from JS to Common
2018-11-08 15:00:08 +03:00
Svyatoslav Kuzmich
4f6a18e29a
[IR] Update parents when transforming declaration containers
2018-11-08 15:00:08 +03:00
Svyatoslav Kuzmich
38b31e8f7d
[JS IR BE] Fix reusing expression instances
2018-11-08 15:00:08 +03:00
Svyatoslav Kuzmich
47b0f94903
[JS IR BE] Fix funny safe call
2018-11-08 15:00:08 +03:00
Svyatoslav Kuzmich
27ff4da94d
[JS IR BE] Bugfix: set overriden symbols for generated bridges
2018-11-08 15:00:08 +03:00
Pavel V. Talanov
54dc1a779e
Fix test: experimental API usage error reporting in js module
...
Make module a js module so that test passes
2018-11-08 11:22:46 +01:00
Toshiaki Kameyama
6971ca44e7
Generate equals and hashCode: enable for data classes #KT-17502 Fixed
2018-11-08 12:51:29 +03:00
Dmitry Petrov
b5664755c8
Minor: remove IGNORE_BACKEND for passing JS_IR tests
2018-11-08 12:29:15 +03:00
Dmitry Petrov
8262d4a4b9
psi2ir: Don't generate constructor bodies for 'external' classes
...
#KT-27934
2018-11-08 12:29:15 +03:00
Dmitry Petrov
51002ee620
psi2ir: Handle missing "then" branches as empty blocks
...
#KT-27933
2018-11-08 12:29:15 +03:00
Dmitry Petrov
bd1491ac8a
psi2ir: Merge constant entries in string template expressions
...
This is required to handle UCNs properly, see KT-28006.
#KT-28006
2018-11-08 12:29:15 +03:00
technoir
6bb5e028a5
Multiple templates with concatenation generator should add spaces after commas (KT-27954)
2018-11-08 11:21:11 +03:00
Ilya Matveev
798b4a8164
Update Kotlin/Native: 1.0.2
2018-11-08 11:06:49 +03:00
Mikhail Glukhikh
772ae60512
Extract inspection names from GradleInspectionTest into testData
2018-11-08 11:04:04 +03:00
Mikhail Glukhikh
52815f5eb5
Extract test files from GradleInspectionTest into testData
2018-11-08 11:04:04 +03:00
Denis Zharkov
eae7e43583
Avoid redundant String allocations in JvmDescriptorTypeWriter
...
In most cases, jvmCurrentTypeArrayLevel == 0 and we can just use `type`
The change was initially suggested by @gorrus
2018-11-08 10:44:13 +03:00
Toshiaki Kameyama
4ae837e669
Redundant lambda arrow: fix false positive in 'when/if' without block #KT-28047 Fixed
2018-11-08 10:40:02 +03:00
Toshiaki Kameyama
0bfcfb5716
ProtectedInFinalInspection: don't report for finalize() method #KT-13311 Fixed
2018-11-08 10:37:36 +03:00
Toshiaki Kameyama
b935f52a63
ProtectedInFinalInspection: reformat
2018-11-08 10:37:36 +03:00
Toshiaki Kameyama
9c18e24de5
Change to function invocation fix: use parentheses in string template
...
#KT-5071 Fixed
2018-11-08 10:33:50 +03:00
Timo Obereder
3c75d46328
Correctly handle end-of-line comment in "Add braces to if"
...
#KT-27408 Fixed
2018-11-08 10:33:15 +03:00
Alexander Udalov
61d3b6ee1f
Restore heuristic to compute inner class names in ClassifierResolutionContext
...
This commit restores the heuristic removed in 9df02b2366 , but only
enables it in case the class wasn't found with the name mapped initially
according to the InnerClasses attribute values. This helps to support
class files which do not have the InnerClasses attribute for all nested
referenced classes, such as those generated by Groovy.
Note that in theory it's still possible for this code to behave
incorrectly, for example a reference to a class `C` nested in a
_top-level_ class named `A$B` will not be loaded by this code correctly.
This is a lower-priority issue and it will need to be fixed later.
#KT-27874 Fixed
2018-11-07 18:12:58 +01:00
Alexander Udalov
a3231e561c
Remove unneeded name-handling code in ClassifierResolutionContext
...
The only place where a name with dots was passed to
ClassifierResolutionContext.mapInternalNameToClassId was in
BinaryClassSignatureParser.parseParameterizedClassRefSignature, where
for some reason names can be both of internal (`a/b$c`) and canonical
(`a/b.c`) form. Supporting both names in mapInternalNameToClassId was
confusing because JVM internal names cannot contain dots. Replace dots
with dollars in parseParameterizedClassRefSignature to get rid of the
dot-name handling in mapInternalNameToClassId and rely on the correct
(simplified) InnerClasses-based name resolution later instead.
Also inline mapDescToClassId to its only usage.
2018-11-07 18:12:58 +01:00
Georgy Bronnikov
c20f93ddbf
Mute failing test
2018-11-07 19:09:15 +03:00
Georgy Bronnikov
dbfbfa65a6
Remove IrClass.isFileClass as unneeded
2018-11-07 19:09:15 +03:00
Georgy Bronnikov
a814e4a314
IR. Remove ClassLowerWithContext
...
The code is never used and shows some signs of bit rot.
2018-11-07 19:09:15 +03:00
Georgy Bronnikov
1aec16ca29
JVM_IR. Remove FileClassDescriptor, no longer used
2018-11-07 19:09:15 +03:00
Georgy Bronnikov
0a43054a92
JVM_IR. Remove descriptors from FileClassLowering
2018-11-07 19:09:15 +03:00
Georgy Bronnikov
95fbe29350
JVM_IR: remove descriptors from JvmCoercionToUnitPatcher
2018-11-07 19:09:15 +03:00
Toshiaki Kameyama
c9477d94ad
Replace if with when: fix behavior on 'else if' #KT-4645 Fixed
2018-11-07 19:02:11 +03:00
Dmitry Petrov
1523185734
KT-27948: Use proper KotlinType when comparing with literal 0
...
#KT-27948
2018-11-07 18:17:29 +03:00
Dmitry Petrov
e14f74bc18
KT-27948: Properly coerce values when generating areEqual call
...
#KT-27948
2018-11-07 18:17:29 +03:00
Dmitry Petrov
ac7cc0c08e
KT-27706: Dispatch receiver type for constructor accessor is Object
2018-11-07 18:17:29 +03:00
Dmitry Petrov
ea4afdaebe
KT-27705: Use proper types for captured outer class instance
...
Call typeMapper only if we have an inline class.
2018-11-07 18:17:29 +03:00
Mikhael Bogdanov
60986293bf
Minor. Use until in for iterator
2018-11-07 15:42:58 +01:00
Mikhael Bogdanov
d2a205c72d
Update synthetic parameter processing logic according to ASM 7 changes
...
#KT-27774 Fixed
2018-11-07 15:42:57 +01:00
Toshiaki Kameyama
23b9889ebb
Redundant companion reference: Fix false negative in enum entry #KT-27861 Fixed
2018-11-07 17:21:41 +03:00
Monchi
07ca958ff0
Add the quickfix to add property to supertype #KT-17004 Fixed
2018-11-07 17:00:26 +03:00
Simon Ogorodnik
aa8031691e
Fix picocontainer version
2018-11-07 15:16:39 +03:00
Toshiaki Kameyama
0fcd1a2072
Introduce "Delegate to 'var' property" inspection #KT-26724 Fixed
2018-11-07 13:59:00 +03:00
Alexander Udalov
17d740a373
Do not try computing return type in OverloadChecker
...
Return type is not needed for checking overloads, but querying it may
involve resolving function bodies, which usually happens after overload
checking (see LazyTopDownAnalyzer.analyzeDeclarations) and at this point
can lead to incorrect BACKING_FIELD_REQUIRED value being computed for
some properties (see KT-27895)
#KT-27895 Fixed
2018-11-07 11:00:15 +01:00
Anton Bannykh
829bdf6061
JS: fix noInline version of inline suspend fun (KT-27611 fixed)
2018-11-07 12:34:00 +03:00
Toshiaki Kameyama
455db32199
"Remove parameter" quick fix: remove also type constraint
...
#KT-26673 Fixed
2018-11-07 12:20:35 +03:00
Anton Bannykh
59009430e5
JS: report inline suspend functions to IC
...
* Also inline suspend lambda'a
* Also use correct JsName's in exported suspend inline fun's
* Also use less unused imports
2018-11-07 12:11:01 +03:00
Anton Bannykh
82268cd95d
JS: fix concurrent access to NameSuggestion.cache
2018-11-07 12:07:58 +03:00
Anton Bannykh
5dae00182d
JS: fix suspend lambda inlining
...
* Also avoid casts when setting inline metadata
2018-11-07 12:07:02 +03:00