Commit Graph

67897 Commits

Author SHA1 Message Date
Nick 7086b0cbf3 [FIR] Don't report duplicated errors in component calls typeRefs 2020-08-02 18:19:46 +03:00
Nick 4ceae8dc5e [FIR] Don't report duplicated errors in function calls typeRefs 2020-08-02 18:19:46 +03:00
Nick 6f85a07290 [FIR] Don't report duplicated errors in property declarations 2020-08-02 18:19:46 +03:00
Nick 889324e972 [FIR] Ignore failing test, improve DiagnosticKind, fix UPPER_BOUND 2020-08-02 18:19:45 +03:00
Mikhail Glukhikh 9335e09149 [FIR] Don't report duplicated errors in implicit properties / parameters 2020-08-02 18:19:45 +03:00
Mikhail Glukhikh ceaffb1e8b [FIR] Don't report duplicated errors in implicit primary constructors 2020-08-02 18:19:45 +03:00
Mikhail Glukhikh 749346b73b [FIR] Don't report duplicated errors on default accessor error type refs 2020-08-02 18:19:45 +03:00
Mikhail Glukhikh e0d25876b0 [FIR] Don't report simple diagnostics on fake sources 2020-08-02 18:19:44 +03:00
Mikhail Glukhikh 551bdd267d [FIR] Introduce WRONG_NUMBER_OF_TYPE_ARGUMENTS diagnostic 2020-08-02 18:19:44 +03:00
Mikhail Glukhikh 0804c6a0f3 [FIR] Introduce TYPE_ARGUMENTS_NOT_ALLOWED & some other type errors
This commit introduces several different things, in particular:
- check type arguments in expressions
- new TypeArgumentList node to deal with diagnostic source
- ConeDiagnostic was moved to fir:cones
- ConeIntermediateDiagnostic to use in inference (?) without reporting
- detailed diagnostics on error type
2020-08-02 18:19:44 +03:00
Jinseong Jeon c744dfba9c FIR: distinguish anonymous object as enum entry when scoping
so that `this` reference with the enum entry name as label can be
resolved
2020-08-02 18:06:15 +03:00
Jinseong Jeon 52631b7abd FIR2IR: make local storage track scopes, including anonymous init 2020-08-02 18:05:09 +03:00
Nick 26e3a111d6 [FIR] Add diagnostics for object related problems 2020-07-31 19:34:55 +03:00
Nick 694d3cad4e [FIR] Exposed visibility checker: optimize checks for local visibility 2020-07-31 19:28:10 +03:00
Nick 60462bea1c FirEffectiveVisibilityResolver: search parent in containingDeclarations
When determining effective visibility of 'something',
we use containing declarations from the context to find 'something'
parent, to avoid calling getClassSymbolByFqName for all cases.
2020-07-31 19:28:04 +03:00
Nick 7145caca40 [FIR] Refactor effective visibility calculation
Before this commit, we had effective visibility as a part of FIR status,
so it was integrated into the full pipeline. In this commit,
we introduced "effective visibility as a service" which is now used
only by exposed visibility checker. This allows us to make the thing
universal for all FIR nodes, including nodes for Java / deserialized.
2020-07-31 19:27:58 +03:00
Steven Schäfer b15e32936e JVM IR: Optimize delegated properties (KT-36814) 2020-07-31 19:00:27 +03:00
vldf 8724efbe8a [FIR] Add empty range checker 2020-07-31 16:28:37 +03:00
vldf b10defdbab [FIR] Add redundant single string expression template checker 2020-07-31 16:28:37 +03:00
vldf 95e0ba3d5c [FIR] Add ArrayEqualityOpCanBeReplacedWithEquals checker 2020-07-31 16:28:37 +03:00
Ilmir Usmanov 4d21a496fe Minor. Update tests 2020-07-31 14:33:52 +02:00
Dmitry Petrov e11c90f26c JVM_IR: KT-40293 Box return type for DefaultImpls methods if required 2020-07-31 14:48:12 +03:00
Ilya Chernikov 034d5a948c Add JvmDefault to the new EP method for compatibility with older impls 2020-07-31 12:07:10 +02:00
Ilmir Usmanov fa8c6deb18 Support restricted suspend lambdas in JVM_IR
#KT-40135 Fixed
2020-07-30 20:40:37 +02:00
Ilmir Usmanov 2c205410fa Check whether the field is indeed being initialized
in checkFieldInExactlyOnceLambdaInitialization
 #KT-40691 Fixed
2020-07-30 19:04:54 +02:00
Nikolay Krasko d8b76f5b26 Register additional repository id 2020-07-30 19:33:58 +03:00
Vladimir Ilmov 7eca13569b (CoroutineDebugger) Enable agent for versions 1.3.8.*
Gradle artifact name gets changed from 'kotlinx-coroutines-core' to
'kotlinx-coroutines-core-jvm'. So it should support both.
2020-07-30 17:54:35 +02:00
Toshiaki Kameyama c91858d470 Convert member to extension: do not suggest for delegated properties
#KT-35128 Fixed
2020-07-30 17:32:31 +03:00
Dmitry Petrov 46fccae7d1 PSI2IR: KT-40499 Fix delegated property desugaring
No type arguments were provided for property reference inside delegated
property accessors.
2020-07-30 13:18:36 +03:00
Jinseong Jeon bff36e0199 FIR2IR: convert annotations on FirTypeRef 2020-07-30 11:25:36 +03:00
Georgy Bronnikov 4ca98041cd IR: update test data 2020-07-30 11:24:08 +03:00
Georgy Bronnikov a27d63f58f JVM_IR: flexible nullability as annotation
We carry information about flexible nullability of IrType as an
annotation, so there is no need to look at its underlying KotlinType.
2020-07-30 11:24:07 +03:00
Georgy Bronnikov a2e9521ad5 Make DescriptorlessExternalPackageFragmentSymbol public 2020-07-30 11:24:07 +03:00
Georgy Bronnikov c2ead0303b IR: remove more descriptor usage 2020-07-30 11:24:07 +03:00
Alexander Gorshenev 9a717e9ecf Don't copy default value parameters for fake overrides 2020-07-29 22:15:10 +03:00
Mark Punzalan 2cfd776092 ForLoopsLowering: Assume step == 1 for *Range (e.g., IntRange) and
handle accordingly (e.g., do not read `step` property).
2020-07-29 20:44:51 +02:00
Dmitry Petrov 09e47fff7b Fix KotlinGradleIT.testCustomCompilerFile
Referencing org.jetbrains.annotations.{Nullable, NotNull} classes in
static initializer causes ClassNotFoundError in testCustomCompilerFile.
2020-07-29 20:33:17 +03:00
Dmitry Petrov dae358c792 JVM: KT-40664 disable optimization for 'ULong in range of UInt' case 2020-07-29 20:33:17 +03:00
Dmitry Petrov f2493d0950 JVM: KT-40665 more exact check for intrinsified range 'contains' 2020-07-29 20:33:17 +03:00
Roman Artemev 0559e192ee [JS IR] Support external delegation in case of JS in psi2ir
- fix FE delegation resolver
 - fix critical KT-40650
2020-07-29 19:57:05 +03:00
Nicolay Mitropolsky c254651ed3 Uast: handling annotations on the property receiver (KT-40539) 2020-07-29 19:42:22 +03:00
Yaroslav Chernyshev 325ad56dcd Populate Kotlin source set roots with KotlinSourceRootTypes
By default Kotlin source root is populated with JavaSourceRootType and
changed during import only if real source folder exists.
Now Kotlin source roots has valid source type right after creation

#KT-37106 Fixed
2020-07-29 19:24:44 +03:00
Ilmir Usmanov fec845365a Minor. No longer ignore obsolete PRE_RELEASE_CLASS diagnostic
in coroutine tests.
2020-07-29 17:52:01 +02:00
Simon Ogorodnik ebfcd7e074 J2K: Improve presentation of conversions 2020-07-29 17:56:03 +03:00
Simon Ogorodnik 5c745facf4 J2K: Improve error message in case of incorrect detach 2020-07-29 17:56:02 +03:00
Simon Ogorodnik dc963e4ff6 Improve J2K progress reporting 2020-07-29 17:56:02 +03:00
Simon Ogorodnik 8bcf1000f6 J2K: Fix java 9 try-with-resources 2020-07-29 17:56:02 +03:00
Simon Ogorodnik c5005f8695 J2K: Speed-up add imports 2020-07-29 17:56:01 +03:00
Simon Ogorodnik cd0c644654 J2K: Fix incorrect early detaching of elements in for conversion 2020-07-29 17:56:00 +03:00
Simon Ogorodnik 8c2dd876b5 J2K: Fix incorrect argument remapping when introducing defaults 2020-07-29 17:56:00 +03:00