Tianyu Geng
94de193993
FIR: introduce VALUE_PARAMETER_WITH_NO_TYPE_ANNOTATION check
...
Besides adding VALUE_PARAMETER_WITH_NO_TYPE_ANNOTATION,
we remove here NO_TYPE_FOR_TYPE_PARAMETER since it doesn't exist in FE1.0.
The name also doesn't make much sense.
From the usage it looks like it should have been
VALUE_PARAMETER_WITH_NO_TYPE_ANNOTATION instead.
2021-03-17 15:04:43 +03:00
sebastian.sellmair
f4b840467f
CommonizerIT: Mark Windows as non-executable target
2021-03-17 10:55:46 +00:00
Dmitriy Dolovov
5a35018a88
[Commonizer] Move source code to the folder that corresponds package name
2021-03-17 13:34:14 +03:00
Dmitriy Dolovov
fc4f66b702
[Commonizer] Change the main package name
...
org.jetbrains.kotlin.descriptors.commonizer -> org.jetbrains.kotlin.commonizer
2021-03-17 13:34:06 +03:00
Alexander Dudinsky
28e4ce191b
[Test] Add 'kotlin-stdlib-jdk7' to dependency for publishing KGP
2021-03-17 13:12:57 +03:00
Mark Punzalan
10d16d10d5
Raw FIR: Fix downward propagation of external and inline from
...
property to default accessors for light-tree.
2021-03-17 10:45:26 +01:00
Mark Punzalan
7d31ea3e8f
FIR checker: Add utility functions for FirModifierList.
2021-03-17 10:45:26 +01:00
Mark Punzalan
315047b164
FIR checker: Make FirJvmExternalDeclarationChecker a
...
FirMemberDeclarationChecker.
Set isExternal in status for FirRegularClass. Invoke member declaration
checkers for FirRegularClass.
2021-03-17 10:45:26 +01:00
Mark Punzalan
cef26a043e
FIR checker: Merge FirConstDeclarationChecker with
...
FirConstPropertyChecker.
2021-03-17 10:45:26 +01:00
Mark Punzalan
beaeb74a26
FIR checker: Separate FirExternalDeclarationChecker as it is
...
JVM-specific.
2021-03-17 10:45:26 +01:00
Mark Punzalan
c3d2ce0c1f
FIR checker/IDE: Add checker and quickfix for WRONG_MODIFIER_TARGET.
...
There are only simple checks for `external` and `const` for now. The
rest of the checks (see ModifiersChecker in FE1.0) will be added later.
2021-03-17 10:45:26 +01:00
Mikhail Glukhikh
ebfc431733
FIR body resolve context: fix accessor scope handling
2021-03-17 12:13:23 +03:00
Mikhail Glukhikh
ca15df7815
FIR: introduce separate containingClass in BodyResolveContext
2021-03-17 12:13:23 +03:00
Mikhail Glukhikh
f9618db9e2
FIR: rearrange functions in BodyResolveContext
2021-03-17 12:13:23 +03:00
Mikhail Glukhikh
d30299c29e
FIR: introduce BodyResolveContext.forBlock, withWhenExpression
2021-03-17 12:13:22 +03:00
Mikhail Glukhikh
6ae948b655
FirAbstractBodyResolveTransformer: drop some unused context functions
2021-03-17 12:13:22 +03:00
Mikhail Glukhikh
cbf38b119c
FIR: introduce BodyResolveContext.storeCallableReferenceContext
2021-03-17 12:13:22 +03:00
Mikhail Glukhikh
8b7b15f02b
FIR: refactor delegating constructors resolve
2021-03-17 12:13:22 +03:00
Mikhail Glukhikh
8a9be56d07
FIR: introduce BodyResolveContext.forFunctionBody
2021-03-17 12:13:22 +03:00
Mikhail Glukhikh
b4cec3fb5d
FIR: introduce BodyResolveContext.forEnumEntry
2021-03-17 12:13:22 +03:00
Mikhail Glukhikh
2db413d535
FIR: enhance (using mode inside) BodyResolveContext.withAnonymousFunction
2021-03-17 12:13:21 +03:00
Mikhail Glukhikh
798d848a91
FirReturnsImpliesAnalyzer: find receiver/variable of accessor properly
2021-03-17 12:13:21 +03:00
Mikhail Glukhikh
a345b81f2a
Use BodyResolveContext.with* functions in FirContractResolveTransformer
2021-03-17 12:13:21 +03:00
Mikhail Glukhikh
4d519f646e
FIR: extract BodyResolveContext.withAnonymousInitializer, withParameter
2021-03-17 12:13:21 +03:00
Mikhail Glukhikh
4235075f35
FIR: extract BodyResolveContext.withAnonymousFunction
2021-03-17 12:13:21 +03:00
Mikhail Glukhikh
d7b2ab6b99
FIR: extract BodyResolveContext.withConstructor in variations
2021-03-17 12:13:21 +03:00
Mikhail Glukhikh
bd2cdf2ec9
FIR: extract BodyResolveContext.withField
2021-03-17 12:13:21 +03:00
Mikhail Glukhikh
64353f34e9
FIR: extract BodyResolveContext.withProperty
2021-03-17 12:13:20 +03:00
Mikhail Glukhikh
06b3a0d57b
FIR: extract BodyResolveContext.withSimpleFunction
2021-03-17 12:13:20 +03:00
Mikhail Glukhikh
db2b6e92e5
FIR: extract BodyResolveContext.withAnonymousObject
2021-03-17 12:13:20 +03:00
Mikhail Glukhikh
e5325e70fc
FIR: extract BodyResolveContext.withRegularClass
2021-03-17 12:13:20 +03:00
Mikhail Glukhikh
4cff6d93be
Get rid of containingClass storage in FirDeclarationsResolveTransformer
2021-03-17 12:13:20 +03:00
Mikhail Glukhikh
91607044d0
FIR: extract BodyResolveContext.withFile
2021-03-17 12:13:20 +03:00
Andrey
b7dc1e64b1
[KAPT] Disable JPMS when running annotation processing
...
If sources contain module-info.java javac tries to validate modules existence/visibility during AP phase and fails, because we don't specify modules-path/patch-module. All these checks will be done in kotlin compiler and in javac for java classes. And it is not necessary to do it in AP too.
So we go for easiest path possible - disable jpms for AP.
#KT-32202 Fixed
2021-03-17 11:10:27 +03:00
Ilmir Usmanov
a90a5f6dd4
Check for backend when checking for suspend in fun interfaces
2021-03-16 22:37:44 +01:00
Steven Schäfer
bf2942b5cc
JVM IR: Add Object.clone to JvmSymbols
...
The `clone` function is not available in the builtin classes created
from fir.
2021-03-16 21:30:18 +01:00
Steven Schäfer
99a4779c6b
JVM IR: Don't produce line numbers in synthetic Enum members
2021-03-16 21:30:18 +01:00
Steven Schäfer
5be00cfa04
JVM IR: Don't use null checks in Enum.valueOf
2021-03-16 21:30:18 +01:00
Steven Schäfer
bea1a8c422
JVM IR: Use Object.clone in Enum.values
2021-03-16 21:30:18 +01:00
Ilmir Usmanov
e47715f52b
Minor. Add tests with returning inline class from SAM adapter
2021-03-16 20:57:05 +01:00
Nikolay Krasko
aff25b3666
Remove jcenter usages
2021-03-16 22:24:10 +03:00
Nikolay Krasko
74dd8726c0
Update repositories in kotlin/buildSrc
2021-03-16 22:24:08 +03:00
Mikhail Glukhikh
0e8f8362da
FIR checkers: use isNullableType() instead of isSubtypeOfAny()
2021-03-16 21:56:11 +03:00
Mikhail Glukhikh
599a0d9c2b
Minor fixes in FirTypeParameterInQualifiedAccessChecker
2021-03-16 21:56:10 +03:00
Mikhail Glukhikh
0b9598d880
Minor fixes around FirKClassWithIncorrectTypeArgumentChecker
2021-03-16 21:56:10 +03:00
Jinseong Jeon
4c08d10cce
FIR checker: report expression of nullable type parameter as LHS of class literals
2021-03-16 21:56:10 +03:00
Jinseong Jeon
26441ed64f
FIR IDEA: avoid unnecessary type casting
2021-03-16 21:56:10 +03:00
Jinseong Jeon
7fff4108b6
FIR checker: report KClass with incorrect type argument
2021-03-16 21:56:10 +03:00
Jinseong Jeon
bc2228d434
FIR checker: don't report errors on type parameter as LHS of class literals
...
If a type paramter is not reified or nullable, different errors will
be reported by FirGetClassCallChecker.
When determining whether type parameter wrapped in qualified access is a
standalone expression or not, we examine whether the checker context has
other qualified accesses in stack. Class literals (::class) is desugared
to FirGetClassCall, and thus not stacked as qualified access. Since
class literals are a special type of callable reference (a subtype of
qualified access), we should keep track of FirGetClassCall in a similar
way.
2021-03-16 21:56:09 +03:00
Jinseong Jeon
e29b40b07f
FIR checker: report TYPE_PARAMETER_AS_REIFIED
2021-03-16 21:56:09 +03:00