Alexander Udalov
3c4e5d7615
Fix JvmFieldInInterfaceCompanion.kt for language version 1.4
...
Since 1.4, constant value is no longer written to the class file (and
thus cannot be read) for non-const properties. But in sources,
corresponding property descriptors still have the initializer which is
rendered to text. Therefore we disable the source-vs-binary check and
update the test data to check the new behavior.
2020-01-17 20:35:46 +01:00
Zac Sweers
482874fdc1
Embed proguard/R8 rules in kotlin-reflect artifact jar
...
The Android build pipeline can extract embedded proguard configurations
from dependencies and merge them automatically. This adds a conservative
proguard configuration to the kotlin-reflect JVM artifact in support of
that. This focuses mostly on just retaining what's necessary for
kotlin-reflect's own functionality to operate, but could be expanded if
community feedback discovers other good candidate rules.
With this in place - most Android projects using R8 or Proguard should
Just Work™️ with kotlin-reflect.
2020-01-17 20:03:52 +01:00
Alexander Udalov
ae395bda09
Do not depend on proguard directly in :kotlin-reflect:modularJar
...
This is useful if proguard is disabled with
-Pkotlin.build.proguard=false.
2020-01-17 19:58:27 +01:00
Mikhail Zarechenskiy
547865d5c7
Fix tests for completion after fun keyword
...
It's correct from the current implemention but still questionable and
should be discussed
#KT-35990 Open
2020-01-17 19:37:48 +03:00
Mikhail Zarechenskiy
58c235e722
Set up tests for fun interfaces for JVM backend for now
2020-01-17 19:37:48 +03:00
Mikhail Zarechenskiy
39e0f101b1
Add dependency because some SAM related classes moved to core module
2020-01-17 19:37:48 +03:00
Mikhail Zarechenskiy
76a78fe918
FIC: render fun before interfaces in descriptor renderer
2020-01-17 19:37:48 +03:00
Mikhail Zarechenskiy
8350cf7d14
FIC: rename FunctionConversion -> FunctionalConversion
2020-01-17 19:37:47 +03:00
Mikhail Zarechenskiy
27e104187f
FIC: remove isFun from IR proto as conversion should happen in psi2ir
2020-01-17 19:36:12 +03:00
Mikhail Zarechenskiy
8206cadce2
FIC: support fun interfaces in stub builder
2020-01-17 19:36:12 +03:00
Mikhail Zarechenskiy
70094884ca
FIC: support suspend conversions in jvm codegen
2020-01-17 19:36:11 +03:00
Mikhail Zarechenskiy
b98d8bd7c1
Regenerate tests after rebase on master, add FIR tests
2020-01-17 19:36:11 +03:00
Mikhail Zarechenskiy
3849b5e723
FIC: add codegen tests, adapt previously tests for SAMs
2020-01-17 19:36:09 +03:00
Mikhail Zarechenskiy
b7c43fc7db
Refactoring: move test folder out of "inline classes" folder
...
It was added there by mistake
2020-01-17 19:36:08 +03:00
Mikhail Zarechenskiy
0e90d538df
FIC: propagate info about conversions for deserialized classes
2020-01-17 19:36:08 +03:00
Mikhail Zarechenskiy
0fdebdfeba
Refactoring: move SamConversionResolverImpl to core module
2020-01-17 19:36:07 +03:00
Mikhail Zarechenskiy
cd5c1b96bb
Refactoring: move SamConversionResolver to more applicable package
2020-01-17 19:36:07 +03:00
Mikhail Zarechenskiy
c93c82236c
Refactoring: move common parts about SAMs to frontend module
2020-01-17 19:36:06 +03:00
Mikhail Zarechenskiy
fc32e8b017
FIC: Add synthetic constructors for fun interfaces aka explicit FIC
2020-01-17 19:36:05 +03:00
Mikhail Zarechenskiy
0f242a9931
FIC: Support conversions for suspend functions
2020-01-17 19:36:04 +03:00
Mikhail Zarechenskiy
f43769c50d
FIC: Add diagnostic tests
2020-01-17 19:36:03 +03:00
Mikhail Zarechenskiy
562f0e62a3
FIC: Move sam related methods to ClassDescriptor, fix JVM backend part
2020-01-17 19:36:03 +03:00
Mikhail Zarechenskiy
87e79e72a9
Refactoring: move SamConversionResolver to core.descriptors
2020-01-17 19:36:02 +03:00
Mikhail Zarechenskiy
0ee977c42e
FIC: Support base version of conversions in JVM backend
...
Proper support for JVM backend will be in the further commmits
2020-01-17 19:36:02 +03:00
Mikhail Zarechenskiy
c71c1d45c6
FIC: Make SAM conversions also for fun interfaces, add base test
2020-01-17 19:36:01 +03:00
Mikhail Zarechenskiy
193d807a1e
Refactoring: make parameters of getFunctionTypeForSamType not null
2020-01-17 19:36:01 +03:00
Mikhail Zarechenskiy
55935cc98a
FIC: introduce language feature, modifiers checks and basic tests
2020-01-17 19:36:00 +03:00
Mikhail Zarechenskiy
303811cbd9
FIC: Increase JVM metadata version
2020-01-17 19:35:06 +03:00
Mikhail Zarechenskiy
f7ce1c669b
FIC: Introduce isFun property for descriptors and proto
2020-01-17 19:35:06 +03:00
Mikhail Zarechenskiy
6655f0fc4c
FIC: Increase STUB version because of changes in parser for declarations
2020-01-17 19:35:05 +03:00
Mikhail Zarechenskiy
4aa195e912
FIC: Parse fun keyword in front of interface as a modifier
2020-01-17 19:35:05 +03:00
Georgy Bronnikov
174b3db723
IR: capture more type parameters for local functions.
...
Types of value parameters and captured variables, even unused, need to
be considered.
2020-01-17 19:20:19 +03:00
Victor Petukhov
437a26684d
NI: Prefer nullable lower bound to flexible one when substitution of type variable is performed and remember flexibility of type parameters based on flexibility of its upper bounds
...
^KT-32435 Fixed
2020-01-17 19:16:09 +03:00
Victor Petukhov
68576da494
Temporary change sinceVersion to null for ProhibitVarargAsArrayAfterSamArgument
...
It will be set to `KOTLIN_1_5` as it will be added.
2020-01-17 19:04:04 +03:00
Sergey Igushkin
38feadcfe8
Fix non-existing files passed in classpath to Kotlin/JS compiler
2020-01-17 18:28:25 +03:00
Michael Kuzmin
e8a821986f
Build: drop IntelliJ 2018.3 support (KT-35374)
...
Delete references in code
2020-01-17 18:20:38 +03:00
Michael Kuzmin
9b7717c37a
Build: drop Android Studio 3.4 support (KT-35374)
...
Delete references in code
2020-01-17 18:20:38 +03:00
Steven Schäfer
a49ed1eca2
JVM IR: Generate interface delegations for specialized interface defaults
2020-01-17 18:19:26 +03:00
Steven Schäfer
8746d08dd5
JVM IR: Don't skip bridge generation for concrete fake overrides
2020-01-17 18:19:26 +03:00
Steven Schäfer
c027c0e659
JVM IR: Handle special names for overridden Enum.name/ordinal in MethodSignatureMapper
2020-01-17 18:19:26 +03:00
Dmitry Gridin
6c166e744a
Implement TrailingCommaInspection
...
#KT-34744
2020-01-17 21:02:55 +07:00
Dmitry Gridin
8d37b86e82
KotlinStyleGuideCodeStyle: enable trailing comma by default
...
#KT-34744
2020-01-17 21:02:55 +07:00
Dmitry Gridin
481900b258
TrailingCommaPostFormatProcessor: introduce TrailingCommaVisitor
...
#KT-34744
2020-01-17 21:02:55 +07:00
Dmitry Gridin
b9ed0706fa
FormatterUtil: rename parameters in needTrailingComma functions
...
#KT-34744
2020-01-17 21:02:55 +07:00
Dmitry Gridin
e3cbc56974
TrailingCommaPostFormatProcessor: extract API for inspections
...
#KT-34744
2020-01-17 21:02:55 +07:00
Dmitry Gridin
20836f5788
TrailingCommaPostFormatProcessor: allow everything except adding before 1.4
...
#KT-34744
2020-01-17 21:02:54 +07:00
Dmitry Gridin
c5c035b67c
TrailingCommaPostFormatProcessor: fix comments position before comma
...
#KT-34744
2020-01-17 21:02:54 +07:00
Dmitry Gridin
5a922e5cff
KotlinCommonBlock: refactoring
...
#KT-34744
2020-01-17 21:02:54 +07:00
Dmitry Gridin
d06787886a
Fix tests after implementing trailing comma in formatter
...
#KT-34744
2020-01-17 21:02:54 +07:00
Dmitry Gridin
d98794479d
kotlinSpacingRules: fix cases with EOL comments and comma
...
#KT-34744
2020-01-17 21:02:54 +07:00