Dmitriy Novozhilov
cb5183ab4d
[TEST] Add implementation of new infrastructure services for compiler tests
...
All of new classes lays in lays in :compiler:tests-common-new module
which includes classes for FE 1.0 and FIR diagnostics tests and
JVM black boxtests
2020-12-16 19:52:23 +03:00
Dmitriy Novozhilov
44948aa9a2
[FE] Properly report diagnostics about type arguments of implicit invoke
...
#KT-40396 Fixed
2020-12-16 17:57:58 +03:00
Victor Petukhov
d32d0a65f0
Revert "Report warning on @JvmStatic in private companion objects"
...
This reverts commit 9669ab14
2020-12-16 10:24:18 +03:00
Andrei Klunnyi
3af0257b38
KTIJ-664 [SealedClassInheritorsProvider]: IDE-specific implementation
2020-12-15 18:43:00 +01:00
Dmitriy Novozhilov
55b0775565
[FE] Call SealedClassInheritorsProvider only for sealed classes
2020-12-14 10:43:14 +03:00
Ilmir Usmanov
775d610045
Value classes: Forbid any identity equality check on value class
...
#KT-31130 Fixed
2020-12-10 08:24:48 +01:00
Dmitriy Novozhilov
b6bd7c48f4
[FE] Rename FreedomForSealedClasses feature with more meaningful name
2020-12-09 22:54:38 +03:00
Dmitriy Novozhilov
57a081c399
[FE] Prohibit inheritance of sealed classes in different module
...
KT-20423
2020-12-09 22:54:34 +03:00
Dmitriy Novozhilov
1c9f9130e6
[FE] Prohibit implementing java sealed classes
2020-12-09 22:54:32 +03:00
Dmitriy Novozhilov
6809adee9c
[FE] Extract computation of sealed class inheritors into separate component
...
This is needed to provide more optimal provider in IDE plugin
2020-12-09 22:54:31 +03:00
Dmitriy Novozhilov
8e9e34350f
[FE] Properly support sealed interfaces in exhaustiveness checker
...
#KT-20423
2020-12-09 22:54:27 +03:00
Dmitriy Novozhilov
9609954560
[FE] Allow using sealed modifier on interface and compute sealed modality for them
...
#KT-20423
2020-12-09 22:54:26 +03:00
Dmitriy Novozhilov
d605c7e491
[FE] Prohibit inheritors of sealed classes which are declared in different package
...
#KT-13495
2020-12-09 22:54:25 +03:00
Dmitriy Novozhilov
e76acc8ee0
[FE] Collect inheritors of sealed classes from new places in computeSealedSubclasses
...
#KT-13495
2020-12-09 22:54:24 +03:00
Dmitriy Novozhilov
70c61be1ef
[FE] Allow declare sealed class inheritors as inner or nested classes
...
#KT-13495
2020-12-09 22:54:22 +03:00
Dmitriy Novozhilov
f5f1984a60
[FE] Allow declare sealed class inheritors in different files in one module
...
#KT-13495
2020-12-09 22:54:21 +03:00
Jiaxiang Chen
1a377069dd
Allow AnalysisHandlerExtension to provide additional classpath on retry
2020-12-09 22:15:36 +03:00
Denis.Zharkov
bef50c0342
Correct descriptor shape for @JvmRecord annotated classes
...
This commit adds relevant functions: hashCode, toString, equals
(if the class is not a data class)
And supertype j.l.Record
It only affects descriptor contents, i.e. works for FE
^KT-43677 In Progress
2020-12-09 16:29:04 +03:00
Mikhail Zarechenskiy
2ad4824eb0
Fix exception on resolving collection literal inside lambda
...
#KT-31907 Fixed
#EA-90906 Fixed
2020-12-08 12:55:25 +03:00
Ilmir Usmanov
69be56d042
Value classes: Forbid cloneable value classes
...
#KT-43741 Fixed
2020-12-04 23:27:46 +01:00
Ilmir Usmanov
f43899086a
Value Classes: Forbid var properties with value class receivers
2020-12-04 09:45:56 +01:00
Ilmir Usmanov
0d55c9108d
IC: Forbid inner classes inside inline classes
...
#KT-43067 Fixed
2020-12-04 05:45:53 +01:00
Ilmir Usmanov
15c325cf10
Value classes: Allow nested inline classes
2020-12-04 05:45:51 +01:00
Mikhail Glukhikh
5fbdc0af5e
[FIR] Introduce & use MODALITY_MODIFIER positioning strategy
2020-12-03 19:33:50 +03:00
Mikhail Glukhikh
b1c9d4b046
[FIR] Introduce & use VISIBILITY_MODIFIER positioning strategy
2020-12-03 19:33:50 +03:00
Mikhail Glukhikh
3877933913
[FIR] Adapt VAL_OR_VAR strategy & use it in CanBeValChecker
2020-12-03 19:33:50 +03:00
Mikhail Glukhikh
ea7d738ee1
[FIR] Introduce & use SourceElementPositioningStrategies.OPERATOR
2020-12-03 19:33:49 +03:00
Ilmir Usmanov
516fce37db
Value classes: Allow unsigned arrays in annotations
...
including varargs, apparently.
So, we allow unsigned types and unsigned arrays in annotations,
but disallow user-defined inline classes.
#KT-23816 Fixed
2020-12-03 17:22:08 +01:00
Ilmir Usmanov
9b9c43b702
Value classes: Change relevant diagnostic to say 'value class'
...
instead of 'inline class'
2020-11-27 23:52:08 +01:00
Ilmir Usmanov
ca3e7cf1a7
Value classes: Report lacking @JvmInline only on JVM backend
...
Report when @JvmInline is applied on non-value class.
2020-11-27 23:52:07 +01:00
Ilmir Usmanov
92f1681de0
Value classes: treat @JvmInline value classes as inline classes
...
Report error on value classes without @JvmInline annotation.
Do not check for @JvmInline annotation in value classes since
it breaks reflection.
2020-11-27 23:52:06 +01:00
Ilmir Usmanov
361ed117bb
Value classes: Add isValue property to class descriptors
...
Reuse isInline flag in proto and IR.
Check metadata version on deserialization.
2020-11-27 23:52:05 +01:00
Dmitriy Novozhilov
db9f301eed
[FE] Make DiagnosticFactory.name not null
2020-11-26 11:54:15 +03:00
Mikhail Glukhikh
037c505069
Unbind general FirDiagnostic from PsiFile & PsiElement
2020-11-26 08:37:49 +03:00
Mikhail Glukhikh
68b748e164
Rename DebugInfoUtil.java to DebugInfoUtil.kt, same with AnalyzingUtils
2020-11-26 08:37:48 +03:00
Mikhail Glukhikh
6f8947dd04
Extract UnboundDiagnostic, DiagnosticFactory/Renderer to frontend-common
2020-11-26 08:37:48 +03:00
Mikhail Glukhikh
c7ae176ae4
[FIR] Inherit FIR with parameter renderer from the old parameter renderer
2020-11-26 08:37:47 +03:00
Mikhail Glukhikh
1795c4f3e5
Implement common Diagnostic(Factory/Renderer) in related FIR classes
2020-11-26 08:37:46 +03:00
Mikhail Glukhikh
d47e16331c
Convert DiagnosticFactory.java to Kotlin
2020-11-26 08:37:46 +03:00
Mikhail Glukhikh
84f3a4ba9d
Rename DiagnosticFactory.java to DiagnosticFactory.kt
2020-11-26 08:37:46 +03:00
Mikhail Glukhikh
9040999b55
Convert Diagnostic.java to Kotlin
2020-11-26 08:37:45 +03:00
Mikhail Glukhikh
b6cfcc6cad
Rename Diagnostic.java to Diagnostic.kt
2020-11-26 08:37:45 +03:00
Alexander Udalov
ed481add08
Fix performance regression in KotlinSuppressCache.isSuppressedByAnnotated
...
After a seemingly innocent refactoring in 61548a0a36 , we've lost the
optimization that was enabled by the suppressorAbove logic in
isSuppressedByAnnotated.
2020-11-24 11:49:31 +01:00
Dmitriy Novozhilov
dc662efcf4
[FIR] Introduce FirDiagnosticRenderers
2020-11-13 16:19:29 +03:00
sebastian.sellmair
06cb64bb51
Allow open callable members in expect interfaces
...
#KT-42094 fixed
2020-11-11 17:41:59 +00:00
Dmitriy Novozhilov
025ec8e8b1
Add FQ_NAME postfix to OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION
2020-11-11 09:52:55 +03:00
Alexander Udalov
106ee1d1ff
JVM IR: restore ability to suppress codegen-reported diagnostics
...
In the old backend, BindingContextSuppressCache is used (which is now
created explicitly in GenerationState), which looks up `@Suppress`
annotations on elements right before reporting the diagnostic. In JVM
IR, we clear the binding context after psi2ir, so this approach doesn't
work. This change provides another implementation of KotlinSuppressCache
which eagerly precomputes all suppressions on all annotated elements in
all source files at the point of creation of GenerationState (when the
binding context is still full).
#KT-43047 Fixed
2020-11-09 19:55:31 +01:00
Alexander Udalov
61548a0a36
Fix inspections and slightly "kotlinify" KotlinSuppressCache
2020-11-09 19:48:04 +01:00
Pavel Kirpichenkov
0e8cf58a35
Minor: reformat
2020-11-08 15:33:30 +03:00
Pavel Kirpichenkov
b79b94fe75
[MPP] Allow smart casts for properties from dependsOn modules
...
Smartcasts for public properties from different module are not
stable because module declaring a property in general can be
compiled separately from the module using it. However, if client
module has dependsOn relation with declaring module their simultaneous
compilation is guaranteed which makes this smart cast safe.
Cache all transitive 'expected by' modules in module dependencies.
Extend test to check smart casts are allowed for properties from transitive
'expected by' dependencies and prohibited otherwise.
^KT-42754 Fixed
2020-11-08 15:33:30 +03:00