Commit Graph

72382 Commits

Author SHA1 Message Date
Dmitriy Novozhilov ebced14db2 [FIR] Implement suppressing diagnostics with @Suppress 2021-02-03 18:10:48 +03:00
Dmitriy Novozhilov 459a2886a0 [FIR] Add CheckerContext to DiagnosticReporter and refactor diagnostic reporting
Refactoring includes replacing `Diagnostic.report` extensions in
  checkers with `DiagnosticReporter.reportOn` extension declared
  in DiagnosticReporter.kt
2021-02-03 18:10:48 +03:00
Andrey Zinovyev 923a4427c5 [KAPT] Fix stub generation for anonymous delegates
Replace anonymous classes with superclass in delegate properties
#KT-34838 Fixed
2021-02-03 17:27:41 +03:00
Alexander Udalov 60a05dded0 Build: fix default value for kotlin.build.disable.werror 2021-02-03 15:06:20 +01:00
Denis.Zharkov 7942bd0b3b Minor. Regenerate tests 2021-02-03 16:38:13 +03:00
Dmitry Petrov 2535e5d5c9 Minor: LAMBDAS directive in old back-end tests 2021-02-03 15:11:04 +03:00
Alexander Udalov bd45a6c11d Support -Xsuppress-version-warnings to suppress API/language version warnings
To be used in the project after bootstrap to get rid of warnings like
"Language version 1.3 is deprecated, ..." which prevent us from enabling
`-Werror` in `:compiler:cli` and other modules.
2021-02-03 13:07:04 +01:00
Denis.Zharkov d901ceb734 FIR: Fix loading Java annotations with Class[]-typed methods 2021-02-03 15:05:22 +03:00
Denis.Zharkov 5a55d56320 IR: Fix offsets for value parameters for bridges
Previously, offsets from super class parameter have been used
and they might belong to a different file and those offsets are irrelevant
to the current file
2021-02-03 15:05:22 +03:00
Denis.Zharkov 8712772a5f FIR: Add test for type resolution when referenced nested class from supertypes 2021-02-03 15:05:22 +03:00
Denis.Zharkov c51798d46f Fix warning at VMCounters.kt 2021-02-03 15:05:22 +03:00
Denis.Zharkov e7669ef9d6 FIR: Fix builder inference case with independent calls inside lambda 2021-02-03 15:05:21 +03:00
Denis.Zharkov 29ac4cb9cc Minor. Simplify conditions in shouldRunCompletion 2021-02-03 15:05:21 +03:00
Denis.Zharkov 173a852273 FIR: Fix uninitialized lateinit FirSymbol::symbol for supertype of Java class
Earlier, isForSupertypes has been mapped to different boolean parameter
2021-02-03 15:05:21 +03:00
Alexander Udalov 8b2279072f Fix compilation in tests-compiler-utils 2021-02-03 13:04:21 +01:00
Alexander Udalov e0b6d4d917 Add -Xsuppress-deprecated-jvm-target-warning to modules compiled with 1.6
Currently this leads to an unknown argument warning, but it'll be
removed automatically on the next bootstrap.
2021-02-03 12:51:39 +01:00
Alexander Udalov 99b5e5a373 Deprecate JVM target 1.6
#KT-44650 Fixed
2021-02-03 12:50:52 +01:00
Dmitry Petrov ab20a8ffff JVM_IR indy-lambdas: minor updates and fixes
KT-44278 KT-26060 KT-42621
2021-02-03 14:16:25 +03:00
Dmitry Petrov 088448043a JVM_IR indy-lambdas: don't use indy for big arity lambdas
KT-44278 KT-26060 KT-42621
2021-02-03 14:16:24 +03:00
Dmitry Petrov d94912ed62 JVM_IR indy-lambdas: initial implementation and tests
KT-44278 KT-26060 KT-42621
2021-02-03 14:16:22 +03:00
Igor Chevdar 0bc386cb08 [IR] Fixed bug with reflectionTarget evaluation 2021-02-03 15:26:40 +05:00
Igor Chevdar bb8bf28b8b [PSI2IR] Set reflectionTarget for all adapted references 2021-02-03 15:26:40 +05:00
Andrei Klunnyi 690fb47cbb KT-44079 [Sealed Interfaces]: move refactoring update
The idea behind this commit is that Move Refactoring should warn
developers in case their intention potentially breaks sealed
hierarchies (members must share the same module and package).

Provided algorithm has two goals:
- prevent destruction of correct hierarchies
- help in fixing broken ones
2021-02-03 10:04:26 +00:00
Ilya Goncharov de3678a805 [JS IR] Add test with fun interface call inside lambda
^KT-44433 fixed
2021-02-03 12:13:53 +03:00
Ilya Goncharov d6e74b9620 [JS IR] Use local scope for SAM if there are scopes
[JS IR] Use private for top level sam wrappers and local otherwise

^KT-44433 fixed
2021-02-03 12:13:52 +03:00
Jinseong Jeon ca314c5bb9 FIR checker: add diagnostic CANNOT_WEAKEN_ACCESS_PRIVILEGE 2021-02-03 12:07:36 +03:00
Jinseong Jeon 3a07ca4c64 FIR checker: add diagnostic VAR_OVERRIDDEN_BY_VAL 2021-02-03 12:07:36 +03:00
Jinseong Jeon 80d5a1a1db FIR checker: add diagnostic OVERRIDING_FINAL_MEMBER 2021-02-03 12:07:36 +03:00
Jinseong Jeon 4ef1e1119f FIR LT: introduce positioning strategies for specific modifiers 2021-02-03 12:07:35 +03:00
Jinseong Jeon 0dd5b94556 FIR checker: rename override checker
We can report more diagnostics than type mismatch, e.g.,
nothing to override, var overridden by val, final override, etc.
2021-02-03 12:07:35 +03:00
Jinseong Jeon b48835f3ce FIR checker: fix positions of type mismatch on overrides
To handle implicit return types, those should be reported on
declarations with return type positioning strategy, instead of
return type itself.
2021-02-03 12:07:35 +03:00
Dmitriy Novozhilov 571c4ce398 [Test] Support new configuration directives in old codegen tests 2021-02-03 10:03:23 +03:00
pyos 8277c96933 FIR: copy nullability when mapping type alias arguments 2021-02-03 08:38:56 +03:00
scaventz bd205317aa CLI: improve behavior of -include-runtime
1.fix KT-17344: Include kotlin-reflect to resulting jar if "-include-runtime" is specified, unless the -no-reflect option is specified.
2.fix KT-43220: -include-runtime should add .kotlin_builtins to the output
2021-02-02 12:49:23 -08:00
Alexander Udalov 496d857db1 Add kotlin.build.disable.werror to disable -Werror locally
This can be placed, for example, in `local.properties` to temporarily
disable `-Werror` in compiler/stdlib/plugin/test modules during
development.
2021-02-02 21:47:33 +01:00
Mads Ager 6a959fefd0 [JVM_IR] Fix accessibility bridges for static protected fields.
Super-qualifiers have to be taken into account. Otherwise, too
few accessibility bridges will be generated which can lead to
binary compatibility issues.
2021-02-02 12:46:08 -08:00
Dmitriy Dolovov 62897a194b [Commonizer] Force GC after each serialized target 2021-02-02 23:13:14 +03:00
Dmitriy Dolovov ff45e58543 [Commonizer] Minor. Post-review changes, p.2 2021-02-02 23:13:06 +03:00
Dmitriy Dolovov c8a938275c [Commonizer] Minor. Post-review changes 2021-02-02 23:13:00 +03:00
Dmitriy Dolovov 318dd22bd1 [Commonizer] Add tests for CommonizerTarget 2021-02-02 23:12:54 +03:00
Dmitriy Dolovov 6fe5f85da7 [Commonizer] Use kotlin/Any as the default supertype for commonized class 2021-02-02 23:12:49 +03:00
Dmitriy Dolovov 2438265ba8 [Commonizer] Dump every target to disk immediately when it's ready 2021-02-02 23:12:43 +03:00
Dmitriy Dolovov 9c4af5070b [Commonizer] Ignore acceptable (minor) metadata mismatches in tests 2021-02-02 23:12:37 +03:00
Dmitriy Dolovov a4438ad64f [Commonizer] Fix calculation of type parameter IDs for nested classes and their members 2021-02-02 23:12:30 +03:00
Dmitriy Dolovov 55c37183d9 [Commonizer] Ignore constructors for enum entries 2021-02-02 23:12:23 +03:00
Dmitriy Dolovov dfd1a53624 [Commonizer] Don't serialize kotlin/Any? as the single type parameter upper bound 2021-02-02 23:12:18 +03:00
Dmitriy Dolovov 1c8cd242bf [Commonizer] Don't write IS_EXPECT flag for synthesized expect functions 2021-02-02 23:12:12 +03:00
Dmitriy Dolovov 9d6c0e56ed [Commonizer] Fix HAS_ANNOTATIONS flag calculation for serialized classes 2021-02-02 23:12:07 +03:00
Dmitriy Dolovov b39a205671 [Commonizer] Minor. Improved diagnostics message in tests 2021-02-02 23:12:01 +03:00
Dmitriy Dolovov 80b95a22a4 [Commonizer] Fix property backing/delegate field annotations serialization 2021-02-02 23:11:55 +03:00