Commit Graph

4821 Commits

Author SHA1 Message Date
Simon Ogorodnik 9f6a812786 Fix multiple registration of same type variable in builder inference 2022-03-18 12:14:00 +00:00
Mikhail Glukhikh 87a7408ddf FIR: handle double-imported qualifiers properly 2022-03-15 13:21:02 +00:00
Mikhail Glukhikh b038ae8b0c FIR: handle double-imported constructors properly 2022-03-15 13:21:01 +00:00
Mikhail Glukhikh 0a7da903f4 FE1.0/FIR: add test for "double import" situation 2022-03-15 13:21:00 +00:00
Dmitriy Novozhilov ade2307345 [FIR] Fix exponential analysis of augmented array access calls
^KT-50861 Fixed
2022-03-11 15:36:05 +03:00
Mikhail Glukhikh c8453ec8b4 FIR: report ambiguity-like errors in type resolve 2022-03-10 20:42:42 +00:00
Simon Ogorodnik 4ba5a55626 FIR. Add visibility/deprecation filtering to type resolve 2022-03-10 20:42:39 +00:00
Mikhail Glukhikh b5e2c492c6 FE 1.0: implement initial label resolve warning for KT-51433 2022-03-09 15:19:26 +00:00
Mikhail Glukhikh ebed224f82 FE 1.0: use TYPE_VARIANCE_CONFLICT deprecation factory 2022-03-03 12:57:04 +00:00
Mikhail Glukhikh 7781413a93 FE 1.0: report TYPE_VARIANCE_CONFLICT also on qualifier type arguments
#KT-51439 Fixed
2022-03-03 12:57:04 +00:00
Mikhail Glukhikh 53d6ac24e5 Switch kotlin version to 1.7
* Change 1.6 to 1.7 constants
* Fix SAFE_CALL_WILL_CHANGE_NULLABILITY for testData
* Change EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_WARNING to EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR
* Change NON_EXHAUSTIVE_WHEN_STATEMENT to NO_ELSE_IN_WHEN
* Fix testData for SafeCallsAreAlwaysNullable
* Change T -> T & Any in test dumps
* Change INVALID_CHARACTERS_NATIVE_WARNING -> INVALID_CHARACTERS_NATIVE_ERROR
* TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_WARNING -> TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR
2022-02-25 11:46:27 +00:00
Ivan Kochurkin f751f13c4d [FIR] Fix incompatible KClass<Any> and callable reference Collection::class, ^KT-51272 Fixed 2022-02-23 14:21:59 +03:00
Ivan Kochurkin 31d9313c51 [FIR] Fix "Expected some types" exception, ^KT-51274 Fixed 2022-02-23 14:21:59 +03:00
Ivan Kochurkin 6a3b7a9f91 [FIR] Ignore fake functions in FirExposedVisibilityDeclarationChecker ^KT-51229 Fixed 2022-02-23 14:21:58 +03:00
Ivan Kochurkin 73b45a1254 [FIR] Report UNSUPPORTED on array literals not from annotation classes ^KT-50750 Fixed 2022-02-23 14:21:57 +03:00
Ivan Kochurkin 19285d0569 [FIR] Fix false positive EXPOSED_PARAMETER_TYPE on internal val in constructor of sealed class ^KT-51200 Fixed 2022-02-23 14:21:57 +03:00
Dmitriy Novozhilov c116565c0e [FIR] Allow named arguments for calls of expect functions 2022-02-18 17:44:41 +03:00
Dmitriy Novozhilov b47cc86c57 [FIR] Fix incorrect context usages with withSuppressedDiagnostics call 2022-02-18 17:44:40 +03:00
Dmitriy Novozhilov ccb74b6477 [FIR] Fix computing compatibility of expect and actual modality 2022-02-18 17:44:39 +03:00
Dmitriy Novozhilov e1d21d7a37 [Test] Enable MultiPlatformProjects in multiplatform tests by default 2022-02-18 17:44:39 +03:00
Dmitriy Novozhilov 851305f981 [FIR] Allow smartcasts on member properties for classes from dependsOn dependencies 2022-02-18 17:44:37 +03:00
Victor Petukhov 0518b84b0b [FE] Remove unused SoundSmartcastFromLoopConditionForLoopAssignedVariables language feature 2022-02-16 18:41:52 +03:00
Jinseong Jeon bb766a5235 RAW FIR: flatten if chains 2022-02-15 11:48:53 +03:00
Ilmir Usmanov 909b455758 Support generic underlying type of inline class in FIR
#KT-32162
2022-02-15 08:11:09 +01:00
Ilmir Usmanov 9060168542 Support generic underlying type of inline class
Use upper bound in JVM representation.
 #KT-32162
2022-02-15 08:11:08 +01:00
Victor Petukhov a54c9edaad [FE 1.0] Report progressions resolve changing warning while calling Java methods which pass Collection
^KT-51062 Fixed
2022-02-14 15:43:43 +03:00
Vladimir Dolzhenko 918a91dbdf Escape special names with backticks in test data
#KT-51248
2022-02-10 21:20:47 +00:00
Ivan Kochurkin f32c355190 [FIR] Correct resolving of sam with suspend function from another module, ^KT-51007 Fixed
Ignore fir ide test probably because of KT-50732
2022-02-07 17:22:02 +03:00
Ivan Kochurkin 17c64cf955 [FIR] Add INV to UNARY_OPERATION_NAMES, ^KT-50998 Fixed 2022-02-07 17:22:02 +03:00
Ivan Kochurkin 30871fc08f [FIR] Infer labeled type for lambda in return in catch ^KT-51009 Fixed 2022-02-07 17:22:01 +03:00
Ivan Kochurkin a0510f4a67 [FIR] Fixed Replace ConeTypeVariable on ConeTypeParameter ^KT-51017
in AbstractConeCallConflictResolver.computeParameterTypes
2022-02-07 17:21:59 +03:00
Dmitriy Novozhilov 1591518cf6 [FIR] Support constant unary operators for integer literal operators
^KT-38895
2022-02-07 13:36:37 +03:00
Dmitriy Novozhilov 52b72a7dac [FIR] Implement Int -> Long conversions for literals and operators over them
^KT-38895
^KT-50996 Fixed
^KT-51000 Fixed
^KT-51003 Fixed
^KT-51018 Fixed
2022-02-07 13:36:36 +03:00
Pavel Kirpichenkov 0362d4ac9f [MPP] workaround inc/dec operator checks in expect classes
Implicit receiver type inside expect class is inconsistent with the
type resolved from an explicit reference inside that class. The former
one is a default class type, i.e. expect; the latter one resolves to
an actual type when either expect and actual are in the same module, or
when the sources are compiled for a particular platform.

The workaround is to manually actualize implicit receiver type for one
particular check affected by the broken subtyping.

KT-49714
2022-02-04 16:57:22 +03:00
Pavel Kirpichenkov 90abbb4a9f [MPP] Add test for inc/dec check in expect class
KT-49714
2022-02-04 16:57:21 +03:00
Mikhail Glukhikh 974736809e Fix test data inconsistency caused by commit clash 2022-02-04 14:33:33 +03:00
Mikhael Bogdanov 15e08893aa FIR: support DefinitelyNotNull types
#KT-49465 Fixed
2022-02-03 14:07:20 +01:00
Mikhail Glukhikh 029e946fb2 FIR: report VAL_REASSIGNMENT on synthetic immutable properties
#KT-50972 Fixed
2022-02-01 18:48:50 +03:00
Denis.Zharkov adb9dfb256 FIR: Rework processing AugmentedArraySetCall
Previously (few commits earlier), it contained two versions
of receiver (lhs) generated separately for each desugaring version
that looked a bit redundant.

Now, at FIR building stage we just don't create desugaring sub-trees,
instead they are being built during bodies transformation and that seems
to be much convenient there, since we don't need to reverse-engineer
get-set-operator version to check if containing calls are successful
(as we just built those calls and retain them)

Semantically, this changes may only change how data flow works
for such statements (see changed compatibilityResolveWithVarargAndOperatorCall.kt)

^KT-50861 Relates
2022-02-01 13:12:49 +03:00
Mikhail Glukhikh fd3d86eddf FE 1.0: introduce deprecation for Enum.declaringClass (KT-49653) 2022-01-27 17:27:40 +03:00
Mikhail Glukhikh 983fa4c8c7 FIR: add temporary access to Enum.getDeclaringClass (see KT-49653) 2022-01-27 17:27:39 +03:00
Mikhail Glukhikh c2ab09fa84 Add test for KT-49653 2022-01-27 17:27:38 +03:00
Victor Petukhov 1a23cd8c45 [FE 1.0] Don't try to report specialized resolution ambiguity error for builder inference if the corresponding substitutor is empty
^KT-50989 Fixed
2022-01-27 15:30:16 +03:00
Dmitriy Novozhilov d1fb8338ef [FIR] Infer type of elvis from lhs if rhs is Nothing
^KT-50875 Fixed
2022-01-23 08:22:07 +03:00
Ivan Kochurkin defb0cf611 [FIR] Fix ambiguity between Sequence.forEach and Iterable.forEach (with @HidesMembers) ^KT-50776 Fixed 2022-01-21 19:34:10 +03:00
Anastasia.Shadrina a86b4d767e [FE] KT-50878 Prohibit using contextual declarations without -Xcontext-receivers 2022-01-21 17:21:59 +03:00
Mikhail Glukhikh e8be9d4861 FIR: support don't use builder inference if possible
In this commit we upgrade FIR builder inference logic from
the compiler version to 1.7. FIR-based compiler now works with
"don't use builder inference" flag always ON and supports switching
the flag "use builder inference only if needed". To do it,
ContraintSystemCompleter (FIR) and KotlinConstraintSystemCompleter (FE 1.0)
are made similar with extracting some common parts into
ConstraintSystemCompletionContext.

Test status: one BB test fails after this commit (KT-49285).
Also we have a crush in DFA logic in FIR bootstrap test and somehow
questionable behavior in FIR diagnostic test. However,
two BB tests were fixed, the 3rd case from KT-49925 were also fixed.

#KT-49925 Fixed
2022-01-20 23:46:36 +03:00
Dmitriy Novozhilov cd578e9d13 [FIR] Fix inference in presence of Unit expected type 2022-01-20 11:25:47 +03:00
Dmitriy Novozhilov 1a3841d66d [FIR] Properly enhance raw Class type in java annotations 2022-01-20 11:25:44 +03:00
Dmitriy Novozhilov 239a330ddd [FE 1.0] Add test for KT-50850 2022-01-20 11:25:41 +03:00