Commit Graph

197 Commits

Author SHA1 Message Date
Mikhail Bogdanov 9c0b96af71 Report error on missed specialization in compatibility mode
#KT-39603 Fixed
2020-06-19 11:57:36 +02:00
Mikhail Bogdanov 477cca3c99 Add JvmDefaultWithoutCompatibility annotation 2020-06-19 11:57:35 +02:00
Jinseong Jeon 12181e55c0 FIR deserializer: signature-aware annotation loading for constructors 2020-06-19 10:21:09 +03:00
Jinseong Jeon 781bfa20e8 FIR deserializer: fix conversion of class literal inside annotation array value. 2020-06-19 10:21:09 +03:00
Jinseong Jeon b076bec07f FIR deserializer: signature-aware annotation loading for functions 2020-06-19 10:21:09 +03:00
Mikhail Zarechenskiy d44a7ff8f9 Add test for obsolete issue
The issue was fixed in df1595e

 #KT-39630 Fixed
2020-06-18 13:05:42 +03:00
Mikhail Zarechenskiy df1595e4bc Fix SAM conversions for derived classes
#KT-39535 Fixed
 #KT-37149 Fixed
2020-06-18 12:36:30 +03:00
Victor Petukhov 901b794af3 Use lexical scope from trace during checking suspend context if the analysis of engaged parent function isn't completed
^KT-39461 Fixed
2020-06-16 22:00:04 +03:00
simon.ogorodnik 1a7b30c13a [FIR] Fix incorrect name in anonymous object class id 2020-06-16 00:01:06 +03:00
Dmitriy Novozhilov d7ee168dff [FIR] Create error candidate for completion instead of simple error reference 2020-06-15 15:32:25 +03:00
Denis Zharkov 7b61bf9178 FIR: Add nullability smartcast after !is check
^KT-39072 Fixed
2020-06-15 11:33:42 +03:00
Denis Zharkov 24948a8b3f FIR: Fix incorrect handling bare types when subject is type alias
^KT-39043 Fixed
2020-06-15 11:33:42 +03:00
Alexander Udalov 6e67e1e78d Replace appendln with appendLine in project 2020-06-11 13:01:30 +02:00
Denis Zharkov 5ab05e6e47 FIR: Fix incorrect resolution to synthetic property by implicit receiver
When there's an explicit one

^KT-39028 Fixed
2020-06-11 11:31:39 +03:00
Denis Zharkov 293f78efe8 FIR: Correct capturing for type-alias bases arguments
NB: The test data change at testData/diagnostics/tests/typealias/noApproximationInTypeAliasArgumentSubstitution.fir.kt
is correct: see the relevant non-fir test, the call shouldn't be applicable

^KT-39008 Fixed
2020-06-11 11:31:38 +03:00
Denis Zharkov bea37569e6 FIR: Fix processOverriddenFunctions implementations 2020-06-11 11:31:36 +03:00
Denis Zharkov 38922a84f1 FIR: Do not create synthetic properties for non-Java accessors
^KT-35495 Fixed
2020-06-11 11:01:43 +03:00
Jinseong Jeon fd32e918d5 FIR deserializer: signature-aware annotation loading for property accessors 2020-06-11 10:57:51 +03:00
Jinseong Jeon 2d55b8db07 FIR deserializer: build property accessors if non-default ones exist 2020-06-11 10:57:51 +03:00
Mikhail Zarechenskiy 3921a0ed70 Add test for obsolete issue
#KT-17341 Obsolete
 #KT-32958 Obsolete
2020-06-10 16:00:23 +03:00
Mikhail Zarechenskiy 93e9d3e57d Delay check for possibly deferred return type for reference candidate
This issue appeared after recently added new overload for flatMapTo.
 Before that, we picked candidate returning List<T> and completed
 inference, now we also check one more flatMapTo, which is here is
 incorrect and as a result we go into outer scope. Outer scope contains
 one property with deferred type, which introduced error about
 "typechecker has run into recursive problem" even it isn't applicable
 by receiver.

 So, the fix is to check receiver first and only then check return
 type of a candidate.

 #KT-39470 Fixed
2020-06-09 17:36:58 +03:00
simon.ogorodnik ab02381a83 [FIR] Make overriding generic callables independent of TP bounds order 2020-06-05 17:46:35 +03:00
simon.ogorodnik 2287435740 [FIR] KT-39033: Fix generic property override detection
#KT-39033 Fixed
2020-06-05 17:46:35 +03:00
Mikhail Zarechenskiy 6c5806f971 Add test for obsolete issue
#KT-38161 Obsolete
2020-06-05 16:30:08 +03:00
Mikhail Zarechenskiy fb812301b2 Add test to preserve behaviour
It's important to have ambiguity in these cases to introduce overload
 resolution by suspend-modifier without breaking changes in future

 Relates to #KT-23610
2020-06-05 14:07:08 +03:00
Mikhail Zarechenskiy bfa648972f Introduce call checker for Unit-conversions 2020-06-05 13:24:21 +03:00
Mikhail Zarechenskiy 71cbe97688 Introduce Unit-conversions for simple arguments 2020-06-05 13:24:20 +03:00
Mikhail Zarechenskiy 718f23b34f Compatibility warning for references to companion via name (KT-13934) 2020-06-05 13:24:18 +03:00
Ilmir Usmanov 8cc5f2abfb Forbid val field initialization inside EXACLTY_ONCE lambda
unless the lambda is inline. This way, final field will remain final.
2020-06-04 21:26:48 +02:00
Mikhail Glukhikh 1ea72ec378 Fix test data in FIR diagnostic test (merge with local eff. visibility) 2020-06-04 10:35:01 +03:00
Jinseong Jeon 0d6e309372 FIR: construct type with actual type arguments during GetClassCall transformation 2020-06-04 10:13:37 +03:00
Denis Zharkov 55a4c40970 FIR: Fix diagnostics test data after safe-call refactoring
^KT-38444 In Progress
2020-06-03 10:43:37 +03:00
Denis Zharkov 723b275d99 FIR: Fix rendered fir and DFA graph test data after safe-calls refactoring
^KT-38444 In Progress
2020-06-03 10:43:37 +03:00
Denis Zharkov 7ba1371466 FIR: Support safe-calls new format in body resolution
^KT-38444 In Progress
2020-06-03 10:43:37 +03:00
Denis Zharkov be4d3783a4 FIR: Fix type resolution for anonymous objects
^KT-39050 Fixed
2020-06-03 10:43:37 +03:00
Denis Zharkov 4d484dd971 FIR: Support java array in type argument
^KT-37321 Fixed
2020-06-03 10:43:37 +03:00
Mikhail Glukhikh 0ffa0b2bd7 [FIR] Fix effective visibility handling for local members
In future 'Local' effective visibility could be used
as a flag of local declaration
2020-06-02 18:47:58 +03:00
Mikhail Glukhikh 72dd2ef448 [FIR] Fix CFG building for secondary constructor with delegation 2020-06-02 16:12:32 +03:00
Mikhail Glukhikh 718f0240a1 [FIR TEST] Add problematic CFG test 2020-06-02 16:12:21 +03:00
Dmitriy Novozhilov 069adebf01 [NI] Fix checking for inline lambdas without candidate
#KT-34506
2020-06-01 23:40:32 +03:00
Victor Petukhov 8d05253369 NI: take into account effective variance during adding constraints from LHS instead of only use site variance
^KT-39220 Fixed
2020-06-01 17:24:49 +03:00
Mikhail Zarechenskiy 599f520fd8 Add compatibility warning for chained sam->suspend-conversion 2020-06-01 10:19:35 +03:00
Mikhail Zarechenskiy a5203428a4 Replace resolution error for suspend-conversion with call checker error 2020-06-01 10:19:34 +03:00
Mikhail Zarechenskiy eaeaf3c8a3 Add compatibility warning for suspend conversions 2020-06-01 10:19:33 +03:00
Mikhail Zarechenskiy 47e6805186 Add compatibility warning for reference adaptation 2020-06-01 10:19:33 +03:00
Mikhail Zarechenskiy 01de789c76 Add compatibility warning for SAM conversions on Kotlin functions 2020-06-01 10:19:32 +03:00
Dmitriy Novozhilov 41cdb61ef3 [FIR] Move all symbol providers to separate package 2020-05-29 10:20:57 +03:00
Dmitriy Novozhilov 2812ed0a02 [NI] Use types and systems from return arguments instead of return type of lambda 2020-05-29 09:36:33 +03:00
Dmitriy Novozhilov f76b57d260 [OI] Prefer candidate without @OverloadResolutionByLambdaReturnType 2020-05-29 09:36:33 +03:00
Dmitriy Novozhilov e1418a5540 [NI] Check for maximally specific candidate chosen with factory resolution 2020-05-29 09:36:32 +03:00