Commit Graph

2659 Commits

Author SHA1 Message Date
Jinseong Jeon c3c79b874d FIR IDE: make constant evaluator robust to arithmetic exception 2021-11-01 22:50:47 +01:00
Victor Petukhov 64c682f465 Remove constraints containing stub types after completion of the common system of a builder inference call
^KT-49285 Fixed
2021-10-26 19:37:59 +03:00
Victor Petukhov 2261928f4f Process simple CapturedType in ClassicTypeSystemContext.typeConstructorProjection as well
^KT-49101 Fixed
2021-10-26 19:37:58 +03:00
Yan Zhulanow 44a1fe668e [FIR IDE] Extract implicit set parameter name to reuse it in Analysis API 2021-10-20 19:41:21 +03:00
Vladimir Dolzhenko b2afb602c5 Add InvalidModuleNotifier capability
Relates to #KT-48977
2021-10-02 14:29:25 +02:00
Victor Petukhov 0cb56be14f Have "in type" for java fields to be able to check that type in assignment positions (against rhs' type)
^KT-46727 Fixed
2021-09-30 20:08:52 +03:00
Denis.Zharkov 4733a0d970 Refine naming: *TypeVariable -> *TypeParameter 2021-09-30 14:36:27 +03:00
Denis.Zharkov f7ef551f99 Report warnings on overrides with wrong types nullability
^KT-48899 Fixed
2021-09-30 14:36:26 +03:00
Denis.Zharkov ec97dab6cd Simplify OverridingUtil
Do not use NewKotlinTypeCheckerImpl
2021-09-30 14:36:25 +03:00
Vyacheslav Gerasimov ab146bd6d4 Build: Fix deprecated Gradle configurations usages
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Ivan Kochurkin a816bd9a33 [FIR] Add JVM_INLINE_WITHOUT_VALUE_CLASS, VALUE_CLASS_WITHOUT_JVM_INLINE_ANNOTATION 2021-09-13 20:49:00 +03:00
Dmitriy Novozhilov 70e8d23d6b Fix new warnings in project code 2021-09-12 16:19:33 +03:00
Dmitriy Novozhilov 15b77045ee [FIR] Remove all usages of classes and methods from FE 1.0 from FIR checkers 2021-09-09 17:20:21 +03:00
pyos 56d37c8e1c FE: separate type enhancement and FunctionN@Java warnings 2021-09-06 13:10:55 +03:00
Dmitriy Novozhilov d46e2dd749 Fix OVERRIDE_DEPRECATION warnings in project code 2021-09-02 15:04:07 +03:00
Dmitriy Novozhilov 69c3831865 Rename Deprecation to DeprecationInfo 2021-09-02 15:04:07 +03:00
Dmitriy Novozhilov 762d225bd7 Unify Deprecation classes from :core:compiler.common and :compiler:frontend modules 2021-09-02 15:04:06 +03:00
Denis.Zharkov dc79d8641b Change rendering for definitely non-nullable types from T!! to T & Any
^KT-26245 In Progress
2021-08-31 15:41:14 +03:00
Denis.Zharkov 302eacbf59 Support new form of definitely non-nullable types: T & Any
^KT-26245 In Progress
2021-08-31 15:41:11 +03:00
Dmitriy Novozhilov 7e6e0a3dd6 Remove all type system-specific inheritors of TypeCheckerState 2021-08-26 10:08:51 +03:00
Dmitriy Novozhilov 3f6738c8bc Remove all type system dependent methods from TypeCheckerState 2021-08-26 10:08:51 +03:00
Dmitriy Novozhilov e07512a847 Delegate refineType and prepareType in TypeCheckerState to special services
This is needed to add ability to create type system independent TypeCheckerState
2021-08-26 10:08:51 +03:00
Dmitriy Novozhilov 8b5548df49 Rename AbstractTypeCheckerContext to TypeCheckerState 2021-08-26 10:08:51 +03:00
Victor Petukhov d730db094a Don't look at raw type's arguments while enhancing super types
^KT-48172 Fixed
2021-08-20 13:10:45 +03:00
Ilmir Usmanov 486c6b3c15 Remove obsolete experimental coroutines support
in compiler.
2021-08-13 22:31:30 +02:00
Tianyu Geng 684ef871ee FIR: unify common special names scattered around the code base 2021-08-06 22:57:17 +03:00
Victor Petukhov 3eaa452f9e Take into account SimpleTypeWithEnhancement and subtyping related places
^KT-47854 Fixed
2021-08-04 17:36:50 +03:00
Dmitriy Novozhilov 4f73ebbcbd [Test] Migrate tests for java 9 to regular test infrastructure 2021-08-01 22:23:39 +03:00
Alexander Udalov b2550f69bc Report error if repeated annotation is used with JVM target 1.6
#KT-12794
2021-07-30 19:53:32 +02:00
Denis.Zharkov 699d53e7f9 Fix ISE when copying a function with @NotNull bounded type parameters
For example in the case:
<_A extends @NotNull B, B> void f4(_A x, B y) { }

ISE had happened because while substituting the function
we've been creating copies of old type parameters and when initializing
bounds for one of them bounds for other may not be initialized yet
at the same time bounds were necessary for makesSenseToBeDefinitelyNotNull
2021-07-29 19:45:56 +02:00
pyos c401582770 FE: do not wrap types with enhancements if they're the same 2021-07-29 14:52:51 +03:00
pyos 6cb6abee98 FE: do not create multiple layers of enhancements for warnings 2021-07-29 14:52:51 +03:00
Victor Petukhov 5684b6977a Do preparation of enhancement as well (for types with enhancement), during subtype checks
^KT-47899 Fixed
2021-07-29 14:23:56 +03:00
Pavel Kirpichenkov 19467861c9 [MPP] Fix false positive expect-actual mismatch
Use type refiner to correctly expand actual type alias - expect
class chains, produced by the commonizer. In a case when type
refiner doesn't exist for module create a one-shot thread local
instance. This might happen with modules without source code
in project (coming from build system model).

^KT-46691 Fixed
2021-07-28 18:57:08 +03:00
Pavel Kirpichenkov 2d91917ac7 [MPP] Make type refinement capability aware of HMPP state
Introduce intermediate state for cases when module doens't
have a type refiner even though HMPP is enabled.

KT-46691
2021-07-28 18:57:07 +03:00
Pavel Kirpichenkov 566640aa6d [MPP] Move KotlinTypeRefinerImpl (frontend -> descriptors)
ExpectedActualResolver in certain cases needs an ability
to create a standalone refiner instance, see the following
commits. A direct module dependency (resolution -> frontend)
can't be added, the opposite one already exists which leads
to a dependency cycle. Both modules depend on core.descriptors
module where KotlinTypeRefiner resides.

KT-46691
2021-07-28 18:57:07 +03:00
Alexander Udalov 0a9498f7e2 Build: suppress deprecated JVM target warning globally
There seems to be no point in configuring the compiler argument per
project. This argument will be deleted soon anyway, when we remove
support for JDK 1.6 & 1.7.

Also remove `disableDeprecatedJvmTargetWarning`. It didn't have any
effect in all modules where it was applied because these modules
reassign `freeCompilerArgs` anyway, with
`-Xsuppress-deprecated-jvm-target-warning` in it.
2021-07-27 13:35:39 +02:00
pyos d00fba3718 FE: avoid stack overflow on star projection of enhanced type parameter
#KT-47846 Fixed
2021-07-23 10:03:57 +03:00
Dmitriy Novozhilov 22f57220c1 [FE 1.0] Report INTEGER_OPERATOR_RESOLVE_WILL_CHANGE on rhs of assign
^KT-47729 Fixed
2021-07-16 15:18:46 +03:00
Victor Petukhov 3b16865152 Don't approximate captured types while substitute them in upper bound position 2021-07-09 19:21:17 +03:00
Victor Petukhov c2cf2f36cd Implement inferring materialized self types through a default type in ResultTypeResolver 2021-07-09 19:21:04 +03:00
Victor Petukhov 51c5a54e31 Support type inference for self type materialization calls 2021-07-09 19:20:54 +03:00
Mikhail Zarechenskiy 44cf4be1e5 Inference for some kind of self types 2021-07-09 19:20:52 +03:00
Yahor Berdnikau 7789054547 Migrate repo to use JVM toolchains Gradle feature.
^KT-46972 Fixed
2021-07-05 14:11:12 +00:00
Alexander Udalov 7306256127 JVM IR: support mutability-flexible types 2021-07-01 19:33:55 +02:00
Victor Petukhov ad89d43186 Prevent recursion on captured recursive type parameters of inner classes during computing bound for them
^KT-47459 Fixed
2021-06-29 20:53:54 +03:00
Victor Petukhov e071281b20 Prevent recursion on erasion of raw types with interdependent type parameters
^KT-47480 Fixed
2021-06-29 20:53:52 +03:00
Victor Petukhov 4aeabb6b0f Use upper bound aware type approximator for intersection types inside sam types in contravariant positions to build proper types in terms of subtyping 2021-06-22 21:13:55 +03:00
Victor Petukhov 1b82227308 Don't do new captured type specific checks for old ones in the type checker
^KT-47143 Fixed
2021-06-15 10:07:20 +03:00
Mikhail Glukhikh d8d38862d9 Introduce EXPERIMENTAL_ANNOTATION_WITH_WRONG_RETENTION diagnostic
#KT-22941 Fixed
2021-06-08 11:37:27 +03:00