Ilya Gorbunov
427750ba03
Update builtins test data
2020-04-01 08:06:57 +03:00
Ilya Gorbunov
1c93911279
Make Double and Float known values constant
...
#KT-13887
2020-04-01 08:06:57 +03:00
Mikhail Glukhikh
630adb34db
[FIR] Don't provide receiver as value in delegated constructor call
2020-03-31 20:28:24 +03:00
Mikhail Glukhikh
a377a6fccb
[FIR2IR] Handle references to constructors separately
2020-03-31 20:27:40 +03:00
Mikhail Glukhikh
282509b0da
[FIR2IR] Provide object receivers for callable references
2020-03-31 20:27:24 +03:00
pyos
e98bdc6f8e
JVM: preserve call site markers when inlining lambdas
...
and default functions into their own stubs.
Fixes #KT-35006
2020-03-31 16:06:57 +02:00
pyos
9d21800d8f
JVM: fix SMAP range extension logic
...
If `mapLineNumber` was called in non-monotonic order, e.g. N then N+2
then N+1, the first two calls created a range that spans [N; N+2] but
the third call did not reuse it.
2020-03-31 16:06:57 +02:00
Mikhail Zarechenskiy
38a719cb22
[NI] Fix trace manipulations for builder inference and ::-expressions
...
For a class literal Type::class we are resolving Type as a constructor,
getting all diagnostics (about missing arguments, for example) and then
just not committing this trace with errors
#KT-37626 Fixed
2020-03-31 15:50:58 +03:00
Jinseong Jeon
ff104f4037
[FIR2IR] Set proper visibility of backing fields
2020-03-31 13:12:36 +03:00
Pavel Kirpichenkov
0abe3a6c39
[NI] Report not-a-class LHS error for callable reference arguments
...
^KT-37531 Fixed
2020-03-31 12:04:01 +03:00
Pavel Kirpichenkov
a416fde814
[NI] Move abstract class instantiation check to call checkers
...
This way the check works for callable reference arguments.
Also candidate applicability during resolution does not change compared to the old inference.
^KT-37530 Fixed
2020-03-31 12:04:01 +03:00
Dmitry Petrov
4ade669b9b
Minor: unmute 2 tests fixed in FIR
2020-03-30 21:10:59 +03:00
anastasiia.spaseeva
0397470b85
[Spec tests] Update tests with spec version 0.1-313
2020-03-30 19:12:55 +03:00
Pavel Punegov
d0e28d7c8d
Ignore Java-sepcific test in Native
2020-03-30 18:31:50 +03:00
Dmitry Petrov
cec64a2ec7
KT-37861 'this' is uninitialized in constructor default parameters
2020-03-30 17:23:15 +03:00
Jinseong Jeon
078cf02c8a
FIR: Provide dispatch receiver for 'field' according to property type
2020-03-30 16:57:53 +03:00
Mikhail Glukhikh
a0978a50e8
[FIR2IR] Correct 'this' conversion when it points to non-closest class
2020-03-30 16:57:52 +03:00
Jinseong Jeon
4388b30f87
[FIR] Fix anonymous object handling as 'this' receiver
2020-03-30 16:57:52 +03:00
Mikhail Glukhikh
d1fc6ff6ee
[FIR2IR] Don't provide backing field symbols for non-Java property refs
2020-03-30 16:23:11 +03:00
Mikhail Glukhikh
d4ae992417
[FIR] Apply type arguments for callable references
2020-03-30 16:23:11 +03:00
Mikhail Glukhikh
810b607a65
[FIR2IR] Provide receivers also for property callable references
2020-03-30 16:23:10 +03:00
Mikhail Glukhikh
697006d782
[FIR2IR] Re-use receiver application logic in callable ref conversion
2020-03-30 16:23:10 +03:00
Juan Chen
d8539fdde9
[FIR2IR] Add dispatch & extension receivers to callable references
2020-03-30 16:23:10 +03:00
Victor Petukhov
218c13efc5
[FIR] Remove links to spec sentences during comparison fir and old front-end test data
2020-03-30 11:15:55 +03:00
anastasiia.spaseeva
5986ffae1e
[Spec tests] Add tests for expressions and statements
2020-03-30 11:15:53 +03:00
victor.petukhov
f62901d7d9
[Spec tests] Actualize spec tests
2020-03-30 11:15:52 +03:00
victor.petukhov
2dbce2cc41
[Spec tests] Link diagnostic tests for when expression with Kotlin specification
2020-03-30 11:15:52 +03:00
Igor Chevdar
d808ef10b2
Added some tests on local classes in inline bodies
2020-03-28 15:26:19 +03:00
Igor Chevdar
e2a378bed7
[JS_IR] More subtle local classes copying in inliner
2020-03-28 15:26:19 +03:00
Igor Chevdar
90abf1fda0
[JS_IR] Don't capture the bound receiver of a CR
2020-03-28 15:26:19 +03:00
Dmitry Petrov
042424d599
KT-27524 Don't box (some) inline classes in suspend fun return
...
If an inline class is mapped to a reference type (or an array), it's Ok
to treat JVM view on a suspend function as returning a value of
corresponding inline class (although in reality it returns 'Any?'
because of COROUTINE_SUSPENDED).
2020-03-27 18:29:36 +03:00
Mikhail Glukhikh
d8bc29e6c6
[FIR] Eliminate obsolete NO_SUPERTYPE diagnostic from builder
2020-03-27 18:24:50 +03:00
Nick
b38d30bab0
[FIR] Support several super-related diagnostics
2020-03-27 18:24:50 +03:00
Mads Ager
5570a5fe74
[JVM_IR] Use iinc for incrementing Int variables.
...
Fix line number generation for assignments where the right-hand
side of the assignment is not on the same line.
Fix line number generation for intrinsics functions where the
function is not on the same line as the last argument.
Be careful to not break stepping behavior with the iinc
optimizations.
2020-03-27 18:17:53 +03:00
Steven Schäfer
58685be4e2
IR: Don't use IrStringConcatenation for ordinary toString calls
...
We can only use IrStrinConcatentation to represent calls to Any?.toString
and toString calls on primitive types. Otherwise, x.toString() and "$x"
are observably different when x is a non-null type with null value
(e.g., an @NotNull value coming from Java).
2020-03-27 17:31:48 +03:00
Mikhail Glukhikh
c1b9fdd2f3
Fix diagnostic test data to be consistent with FIR test data
2020-03-27 16:46:59 +03:00
Mikhail Glukhikh
7bfd354a77
Don't report UNUSED_PARAMETER in main from object #KT-37718 Fixed
2020-03-27 16:46:59 +03:00
Mikhail Glukhikh
b27152f903
Replace some FIR syntax errors with more proper diagnostics
2020-03-27 16:46:59 +03:00
Mikhail Glukhikh
2f63c8a46a
[FIR] Enhance diagnostic DSL to be able to use concrete factories
...
Before this commit, things like DiagnosticFactory0<KtDeclaration>
were effectively unusable.
2020-03-27 16:46:58 +03:00
Dmitriy Novozhilov
a1d81aa15f
[FIR-TEST] Fix diff between FIR and old FE testdata
2020-03-27 16:39:02 +03:00
FenstonSingel
b7d8e879a6
[FIR] Support 4 diagnostics for pairs of modifiers
...
In particular, this commit includes:
* Attempt to abstract access to FirSourceElement via FirModifier
* Add more visit functions to DeclarationCheckersDiagnosticComponent
* Add messages+factories for 4 modifier-related errors and warnings
* Introduce FirModifierChecker
2020-03-27 12:34:29 +03:00
Roman Artemev
6e01ec8dd3
[IR] Fix translation of synthetic generic java properties
...
- Compute substituted accessor descriptor to avoid unbound type parameters
2020-03-27 10:52:33 +03:00
Roman Artemev
4bebfd33b9
[IR] Fix unbound type parameter symbol for jvm corner cases
2020-03-27 10:52:33 +03:00
Dmitriy Novozhilov
48fb279721
[FIR] Add constraint to flexible type for declared argument for java parameter
2020-03-27 10:17:12 +03:00
Dmitriy Novozhilov
3acb64c536
[FIR] Add flexible default upper bound for java type parameters
2020-03-27 10:17:12 +03:00
Pavel Kirpichenkov
e39b69839b
[NI] Make constraint check for type variables with complex dependency
...
Additional check for trivial constraints is needed to make lambda
analysis before outer variable fixation to Nothing(?)
^KT-37627 Fixed
2020-03-26 17:06:37 +03:00
Pavel Punegov
ad20deb0b3
Ignore Java-sepcific test in Native
2020-03-26 13:26:17 +03:00
Mark Punzalan
4234fa79c0
[JVM IR] Use append(Char) for 1-length string literals in string
...
templates and plus concatenations.
This is slightly more efficient and mirrors the behavior of the non-IR
backend for templates (but not for plus concatenations).
#KT-36638 Fixed
2020-03-26 12:39:39 +03:00
Dmitry Petrov
9a95941ef3
JVM_IR: Rewrite '?.' and '?:' chains
...
This shortens code and avoids unnecessary boxing in some cases.
2020-03-26 12:19:25 +03:00
Juan Chen
aba7706dec
[FIR] fix test module set up (this fixes 193 BB tests)
...
Added creation and initialization of the test module and its dependencies.
When looking at the emptyProgression test,
I found that getProgressionLastElement was not found,
which should be resolved from the dependencies.
2020-03-26 10:30:47 +03:00