Commit Graph

306 Commits

Author SHA1 Message Date
Ilya Kirillov 1bbcae5ed2 [FIR] fix resolve contract violation from scopes
We cannot call lazy resolve to STATUS phase from scopes as scopes may be accessed on a STATUS phase or earlier

^KT-54890
^KTIJ-23587 fixed
2023-01-13 21:32:51 +00:00
Ilya Gorbunov 916f733f73 Make k.c.Volatile since 1.9 in JVM and Common KT-55268, KT-55609
Leave it experimental since 1.8 for K/Native.
2023-01-04 17:28:46 +00:00
Mikhail Glukhikh 0d50f71fb8 K2: expand type aliases in annotation position #KT-55615 Fixed 2023-01-04 10:06:39 +00:00
Ilya Gorbunov e2d96da396 Introduce experimental kotlin.concurrent.Volatile annotation KT-55268, KT-55609
Use this annotation in tests to ensure it works the same at least on JVM
2022-12-23 19:07:30 +01:00
Ilya Kirillov 644d1bf0d0 [FIR] ignore tests which fail because of resolve contracts violation 2022-12-12 16:21:07 +00:00
Evgeniy.Zhelenskiy 002f6bd34a [FIR] Fix JvmName annotation diagnostics
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-55143
2022-11-25 16:30:22 +01:00
Nikolay Lunyak b6f950ed75 [FIR][FE 1.0] KT-47933: Warn about redundant @Repeatable
Merge-request: KT-MR-7318
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
2022-10-07 13:33:49 +00:00
Nikolay Lunyak fcd3e4f4c5 [FIR JS] KT-51740: Alter positioning of NO_VALUE_FOR_PARAMETER 2022-09-30 21:39:20 +03:00
Ilya Kirillov 556b7894d5 [Low Level FIR] do not search for declarations from kotlin. package in source modules 2022-09-30 12:15:49 +02:00
Mikhail Glukhikh 7333589663 K1/K2: add Enum.entries unconditionally and filter them out in tower
Before this commit, we added Enum.entries only in case when
LanguageFeature.EnumEntries was ON (with an exception in K1/Java case).
In this commit we add Enum.entries unconditionally, and in case
the language feature is OFF we filter them out during tower resolve.
2022-08-12 09:35:27 +00:00
Ivan Kochurkin 792aa24a04 [FIR] Throws by star import wins builtin Throws, ^KT-52407 Fixed, ^KT-52517 Fixed 2022-05-29 23:41:27 +03:00
Ivan Kylchik 51ccc32a3f Update test data after introducing IntrinsicConstEvaluation annotation 2022-05-18 21:19:57 +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
Ivan Kochurkin 73b45a1254 [FIR] Report UNSUPPORTED on array literals not from annotation classes ^KT-50750 Fixed 2022-02-23 14:21:57 +03:00
Dmitriy Novozhilov c80cfb0fdb [FIR] Replace single supertype scope with list of scopes of supertypes in use site scopes
This big refactoring is needed to cleanup building of overrides
  mappings and prevent creating redundant intersection overrides in
  cases when there is no need in them:

```kotlin
interface A {
    fun foo()
}

interface B {
    fun foo()
}

interface C : A, B {
    override fun foo()
}
```

Before this refactoring there was next override tree:
C.foo
  intersection override (A.foo, B.foo)
    A.foo
    B.foo

Also this commit fixes special mapping of overrides in jvm scopes
  for declarations which have kotlin builtins in supertypes with
  special java mapping rules (collections, for example)
2022-01-19 15:24:43 +03:00
Mikhail Glukhikh 0739925869 Drop QUALIFIED_SUPERTYPE_EXTENDED_BY_OTHER_SUPERTYPE diagnostic in 1.7.0
#KT-49016 Fixed
2021-12-23 17:45:49 +03:00
Mikhael Bogdanov 7e99ba30f3 Remove obsolete USAGE_OF_JVM_DEFAULT_THROUGH_SUPER_CALL diagnostic
#KT-47000
2021-12-09 11:30:06 +01:00
Mikhail Glukhikh 533e802c8d FIR: support JVM_DEFAULT_WITH_COMPATIBILITY_* diagnostics (FE 1.0 sync) 2021-12-09 13:26:40 +03:00
Mikhail Glukhikh 178290eac3 FIR: drop JVM_DEFAULT_THROUGH_INHERITANCE diagnostic (FE 1.0 sync) 2021-12-09 13:26:39 +03:00
Mikhael Bogdanov a2395ec8bb Additional diagnostics for @JvmDefaultWithCompatibility 2021-12-06 14:20:25 +01:00
Mikhael Bogdanov c0ffbe03c6 Remove '-Xjvm-default-allow-non-default-inheritance' flag. Enable such inheritance by default
#KT-47000 Fixed
2021-12-03 06:39:38 +01:00
Denis.Zharkov 7eb758fab1 FIR: Avoid propagation of @Exact annotation through elvis 2021-11-26 19:39:52 +03:00
Ivan Kylchik c7435ba760 Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00
Mads Ager b79ca7d7df [FIR] Allow annotation instantiation.
This commit disables the frontend error reporting for supported cases.
2021-11-09 23:51:48 +03:00
Mikhail Glukhikh 7243d30869 Split property use-site targets during FIR building 2021-10-12 16:22:58 +03:00
Ivan Kochurkin e97933a9e5 [FIR] Add POSITIONED_VALUE_ARGUMENT_FOR_JAVA_ANNOTATION 2021-09-13 20:48:55 +03:00
Ivan Kochurkin 55f33999f1 [FIR] Add REPEATED_ANNOTATION, REPEATED_ANNOTATION_WARNING 2021-09-10 00:49:07 +03:00
Ivan Kochurkin f414a91c66 [FIR] Implement FirInterfaceDefaultMethodCallChecker
Add diagnostics: INTERFACE_STATIC_METHOD_CALL_FROM_JAVA6_TARGET,
INTERFACE_CANT_CALL_DEFAULT_METHOD_VIA_SUPER,
DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET
2021-09-10 00:49:04 +03:00
Ivan Kochurkin 2baed77598 [FIR] Add JVM_SYNTHETIC_ON_DELEGATE diagnostic
Extract JVM names to common JvmNames
2021-09-10 00:49:03 +03:00
Ivan Kochurkin 3725c58794 [FIR] Add INAPPLICABLE_JVM_FIELD, INAPPLICABLE_JVM_FIELD_WARNING 2021-09-10 00:49:02 +03:00
Ivan Kochurkin cfd2835254 [FIR] Add JVM Default diagnostics 2021-09-10 00:48:59 +03:00
Nikolay Lunyak 1a3f47badd [FIR] Make FirJvmStaticChecker more consistent with the legacy version 2021-09-09 20:18:49 +03:00
Nikolay Lunyak 2a2c92d8b3 [FIR] Add support for JVM_STATIC_ON_EXTERNAL_IN_INTERFACE diagnostic 2021-09-09 20:18:49 +03:00
Nikolay Lunyak 7006426304 [FIR] Add support for JVM_STATIC_ON_CONST_OR_JVM_FIELD diagnostic 2021-09-09 20:18:49 +03:00
Nikolay Lunyak f3d61c199b [FIR] Add support for JVM_STATIC_ON_NON_PUBLIC_MEMBER diagnostic 2021-09-09 20:18:49 +03:00
Nikolay Lunyak c2e5583780 [FIR] Add support for JVM_STATIC_NOT_IN_OBJECT_OR_COMPANION diagnostic 2021-09-09 20:18:49 +03:00
Nikolay Lunyak 276bfd9305 [FIR] Add support for OVERRIDE_CANNOT_BE_STATIC diagnostic 2021-09-09 20:00:38 +03:00
Nikolay Lunyak 5607be3920 [FIR] Add support for INAPPLICABLE_JVM_NAME diagnostic 2021-09-09 20:00:36 +03:00
Nikolay Lunyak 5ebad97cd5 [FIR] Add support for ILLEGAL_JVM_NAME diagnostic 2021-09-09 19:58:16 +03:00
Andrey Zinovyev 865fccdd29 [FIR] Add messages for JvmRecord diagnostics
Also fix some tests
2021-08-23 10:33:24 +00:00
Andrey Zinovyev 4661656b8c [FIR] JVM_PACKAGE_NAME* diagnostics 2021-08-19 15:25:47 +03:00
Andrey Zinovyev f9b601edae [FIR] @JvmOverloads related checkers 2021-08-19 15:25:44 +03:00
Andrey Zinovyev 17ae69416c [FIR] Add SYNCHRONIZED_* diagnostics 2021-08-19 15:25:43 +03:00
Andrey Zinovyev 7ba8e0d9cc [FIR] Add VOLATILE_ON_VALUE/VOLATILE_ON_DELEGATE diagnostic 2021-08-19 15:25:43 +03:00
Andrey Zinovyev f90b534c4c [FIR] Add STRICTFP_ON_CLASS diagnostic 2021-08-19 15:25:41 +03:00
Tianyu Geng 06ee84f809 FIR checker: report AMBIGUOUS_SUPER 2021-08-10 19:36:44 +03:00
Dmitriy Novozhilov d17f984edf [FE 1.0] Migrate most of warning/error pairs to DiagnosticFactoryForDeprecation 2021-08-03 00:17:33 +03:00
Mikhael Bogdanov 4fe846fb81 Fix test affected by InstantiationOfAnnotationClasses feature 2021-07-29 19:45:57 +02:00
Andrey Zinovyev 15be38192b [FIR] Mark implicit types in accessors as fake
To not check their types in deprecation checker
2021-07-20 14:25:14 +03:00