Roman Artemev
dec307799a
Fix infinite loop in suspend function in case of return from finally [#KT-21961]
...
* add test
2018-07-25 23:04:57 +03:00
Ilmir Usmanov
dc3b230b55
Do not generate continuation's setLabel and getLabel methods in 1.3
...
Also, do not call them.
#KT-25521: Fixed
2018-07-25 15:35:18 +03:00
Zalim Bashorov
a6cd552a71
[JS IR BE] Implement Long.rangeTo and unmute tests
2018-07-25 14:51:08 +03:00
Roman Artemev
eb420a1e0f
Fix [#KT-23921]
...
* make name collector in inliner process handle JsCatch
* visit JsParameter during live analyser in coroutine transformer
2018-07-25 14:22:11 +03:00
Dmitry Petrov
df6d4f358a
KT-22274 report warning on labels that can't be referenced
...
Labels are meaningful only if they can be referenced by 'break',
'continue', or 'return' expressions.
2018-07-25 12:08:20 +03:00
Dmitry Petrov
6fb913a463
KT-22274 report error/warning on incorrect return target label
2018-07-25 12:08:20 +03:00
Roman Artemev
5241b37ad9
Fix fallthrough in suspendable switch [#KT-22694, #KT-23687]
...
* do not explicitly put break for each case
* add test for related cases
2018-07-24 20:19:35 +03:00
Roman Artemev
0c6256d003
Fix initialization order
...
* put inheritance code in the beginning
* put top-level initializer after any declaration
2018-07-24 20:16:39 +03:00
Mikhail Zarechenskiy
f9b19c6286
[NI] Approximate types during type translation for IR
2018-07-24 20:14:17 +03:00
Alexander Udalov
20ddbc9698
Do not generate generic signature for SAM wrapper methods
...
#KT-23870 Fixed
2018-07-24 13:35:47 +02:00
Dmitry Petrov
9dc2ad664d
Fix ConstantValue-related testData for lightClasses tests
...
TODO support custom language version settings for lightClasses tests
2018-07-24 10:52:16 +03:00
Dmitry Petrov
8f103dd8e5
Fix ConstantValue-related testData for loadJava tests
2018-07-24 10:52:16 +03:00
Ilmir Usmanov
fa9653c3d2
Deserialize experimental coroutines as suspend functions/types
...
but deprecate them for now.
Promote stub version.
#KT-25623: Fixed
2018-07-23 21:52:17 +03:00
Dmitry Petrov
65fe1101fd
Object references in object field initializers are 'GET_VAR this@Object'
2018-07-23 18:16:32 +03:00
Svyatoslav Kuzmich
625983b28a
[JS IR BE] Enum class lowering
2018-07-23 15:08:18 +03:00
Dmitry Petrov
86e863951e
Compare FP numbers properly when determining if field initializer needed
2018-07-20 17:53:25 +03:00
Dmitry Petrov
ae0704af9c
Generate singleton references as GET_OBJECT in nested classes
2018-07-20 16:46:18 +03:00
Dmitry Petrov
779cae7db5
Adjust receivers for possibly synthetic properties access
...
Synthetic property accessors are treated as extension functions on Java
classes by the front-end. However, underlying Java accessor methods are
proper members.
2018-07-20 16:46:18 +03:00
Dmitry Savvinov
6dacd1011f
Do not report warning if -XXLanguage turns on bugfix
...
KT-25554 Fixed
2018-07-20 14:24:42 +03:00
Mikhail Zarechenskiy
f8d19718c8
Fix exception on trying to evaluate red code with inline classes
...
#KT-25600 Fixed
2018-07-20 13:58:35 +03:00
Mikhail Zarechenskiy
17243c08c1
Forbid lateinit variables of inline class types
...
Proper support of lateinit inline class values will be added later,
see #KT-23814
#KT-25603 Fixed
2018-07-20 13:58:33 +03:00
Mikhail Zarechenskiy
045058c29a
Support inline class values inside string templates through boxing
...
#KT-25626 Fixed
#KT-25613 Open
2018-07-20 13:58:31 +03:00
Mikhail Zarechenskiy
9aa4247065
Do not box primitives in a single-entry string template expression
2018-07-20 13:46:11 +03:00
Mikhail Zarechenskiy
ec9d8e580e
Leave boxing for compareTo/areEqual methods for inline classes
...
Inline classes can override methods and thus introduce side effects
2018-07-20 11:51:34 +03:00
Dmitry Petrov
acf0bb349c
Update testData for restricted expression annotations retention
2018-07-20 10:39:51 +03:00
Dmitry Petrov
92a8448042
DiagnosticsTestWithJsStdLib should use proper language version settings
2018-07-20 10:39:51 +03:00
Georgy Bronnikov
db19a6e150
Make @JvmOverloads work with JVM_IR
2018-07-19 18:36:37 +03:00
Ilmir Usmanov
0ed5ec868c
Generate probeCoroutineSuspended call in suspendCoroutineUninterceptedOrReturn
...
#KT-25508: Fixed
2018-07-19 14:24:09 +03:00
Dmitry Savvinov
76c651421b
Deprecate visibility of static members inherited from Java
...
Now they are not visible by short name through companion objects, just
like classifiers in KT-21515
^KT-25333 In progress
2018-07-19 13:32:38 +03:00
Dmitry Petrov
99a71b9ecc
Desugar synthetic Java properties in psi2ir
2018-07-19 12:34:45 +03:00
Dmitry Petrov
76bfb94538
Add tests for Java synthetic properties in external dependencies
2018-07-19 12:34:45 +03:00
Alexander Udalov
1464a4ac58
Load Java parameter names correctly in BinaryJavaMethod
...
PSI-based implementation (accessible via
`-Xuse-old-class-files-reading`) loads parameter names from the
"MethodParameters" attribute if it's present, so our own implementation
should as well.
This metadata doesn't seem supported in the java.lang.model.element API
though, so SymbolBasedValueParameter (which is used in `-Xuse-javac`)
will continue to have incorrect behavior for now
#KT-25193 Fixed
2018-07-18 18:15:09 +02:00
Alexander Udalov
0f0602230a
Fix parameter names of Java inner classes in reflection
...
#KT-25541 Fixed
2018-07-18 18:15:09 +02:00
Alexander Udalov
873e1b01d6
Merge and improve tests on Java parameter metadata in reflection
2018-07-18 18:15:08 +02:00
Alexander Udalov
5fbe35d1c8
Add tests on RequireKotlin on nested classes with metadata version 1.4
2018-07-18 17:59:37 +02:00
Alexander Udalov
ea3c5c0107
Use -Xmetadata-version in tests instead of custom preprocessing
...
Test data for the wrongMetadataVersion test has changed because now not
only the .class files have the "future" version, but also the
.kotlin_module file, which prevents the current compiler from being able
to read what parts does a package in the library consist of. This is
related to the TODO in ModuleMapping.kt:89
2018-07-18 17:59:37 +02:00
Alexander Udalov
871b896a21
Add internal compiler argument to change metadata version
...
Will be used in tests to check how we behave on binaries produced by a
"future" compiler
2018-07-18 17:59:37 +02:00
Alexander Udalov
1e9694f1db
Fix version requirement serialization for nested classes
...
Use the version requierement table of the outer DescriptorSerializer
instance when serializing metadata for a class. Pass parent serializer
to DescriptorSerializer.create to make sure the correct table is used.
Serialize nested classes before the outer class in JS and common code,
to make sure requirements are not lost. Also, split
VersionRequirementTest to JVM and JS
#KT-25120 In Progress
2018-07-18 17:58:46 +02:00
Dmitry Petrov
82f22f92ca
Don't generate ConstantValue for non-const vals in Kotlin 1.3+
2018-07-18 15:02:54 +03:00
Alexander Udalov
79c2aa4acf
Minor, move tests on JvmField into subdirectory
2018-07-18 13:24:45 +02:00
Dmitry Petrov
5767f84c0e
Restrict retention for annotations with target EXPRESSION
...
#KT-13762 Fixed
2018-07-18 14:21:03 +03:00
Mikhael Bogdanov
bca6b98ea8
Fix test data
2018-07-18 08:41:48 +02:00
Mikhail Zarechenskiy
bb575866cb
Pass actual invoke parameters for inline functions with inline classes
...
#KT-25511 Fixed
2018-07-17 23:39:38 +03:00
Mikhail Zarechenskiy
77959247d2
Fix bridge generation for inline classes over Any type
2018-07-17 23:39:34 +03:00
Svyatoslav Kuzmich
1abb4f42ac
[JS IR BE] Add ranges to runtime, rangeTo for primitive numbers
2018-07-17 20:18:29 +03:00
Mikhael Bogdanov
52b261e19e
Fix test data
2018-07-17 13:30:43 +02:00
Mikhail Zarechenskiy
b6db8971e4
Warn about annotations that targets non-existing accessors
...
#KT-15453 In Progress
2018-07-17 00:22:53 +03:00
Dmitry Savvinov
70144f8003
Make warning about usage of -XX-flags less scary
2018-07-16 18:49:21 +03:00
Mikhael Bogdanov
e00b7a993f
Write version requirements for @JvmField in interface companion
2018-07-16 16:13:18 +02:00
Mikhael Bogdanov
1d283d243e
Support @JvmField on interface properties
...
#KT-15807 Fixed
2018-07-16 16:13:15 +02:00