Commit Graph

84544 Commits

Author SHA1 Message Date
Ivan Kochurkin 1a40164ef0 [FIR] Fix resolving of single underscore _
Now compiler throws `UNRESOLVED_REFERENCE` here:

```
val boo = { _: Exception -> `_`.stackTrace }
```
2021-07-30 16:58:07 +00:00
Ivan Kochurkin 8bfaa39a5c [FIR] Implement RESOLVED_TO_UNDERSCORE_NAMED_CATCH_PARAMETER
Split underscore checkers
2021-07-30 16:58:07 +00:00
Ivan Kochurkin 10d9988824 [FIR] Implement DANGEROUS_CHARACTERS 2021-07-30 16:58:06 +00:00
Ivan Kochurkin 83895c49c5 [FIR] Implement INVALID_CHARACTERS 2021-07-30 16:58:06 +00:00
Ivan Kochurkin 63fc3645ab [FIR] Optimize performance and fix UNDERSCORE_IS_RESERVED, simplify code 2021-07-30 16:58:05 +00:00
Ivan Kochurkin 2fbb700ec6 [FIR] Add nonFatalDiagnostics to FirQualifierAccess 2021-07-30 16:58:05 +00:00
Ivan Kochurkin b307358f69 [FIR] buildErrorExpression for labels with underscored name
Add ConeDiagnosticWithSource, ConeUnderscoreIsReserved, ConeUnderscoreUsageWithoutBackticks diagnostics
2021-07-30 16:58:05 +00:00
Ivan Kochurkin f5d8535dc5 [FIR] Add aliasSource to FirImport, FirImportImpl 2021-07-30 16:58:04 +00:00
Mikhail Glukhikh 354a06b94a FirSuspendCallChecker: make infix call check more clear 2021-07-30 19:06:55 +03:00
Mikhail Glukhikh 3c2e266c31 FirSuspendCallChecker: use symbol accessor API instead of symbol.fir 2021-07-30 19:06:54 +03:00
Mikhail Glukhikh e0b1d0db53 FirSuspendCallChecker: drop support of experimental coroutines 2021-07-30 19:06:53 +03:00
Mikhail Glukhikh 807f031dcc FIR: introduce RETURN_FOR_BUILT_IN_SUSPEND diagnostic 2021-07-30 19:06:53 +03:00
Mikhail Glukhikh 229dfd3f5f FIR: introduce builtin suspend related diagnostics 2021-07-30 19:06:51 +03:00
Mikhail Glukhikh 391c4db87c FIR: introduce ILLEGAL_RESTRICTED_SUSPENDING_FUNCTION_CALL diagnostics 2021-07-30 19:06:49 +03:00
Mikhail Glukhikh 2397650c24 FIR: introduce NON_LOCAL_SUSPENSION_POINT diagnostic 2021-07-30 19:06:48 +03:00
Mikhail Glukhikh 8f1d07084b FIR: introduce ILLEGAL_SUSPEND_FUNCTION_CALL & PROPERTY_ACCESS diagnostics 2021-07-30 19:06:46 +03:00
Ilya Kirillov e4992176c1 FIR LC: fix inheritance checking for light classes
Before it was not able to check inheritance with type parameters substitutions like

class A<T>
class B: A<Int>
2021-07-30 18:59:21 +03:00
Ilya Kirillov 767af0dae0 HL API: fix super declarations search for local classes 2021-07-30 18:59:19 +03:00
Ivan Kochurkin 0e2d765a2d [FIR] Consider getter and setter for CANNOT_WEAKEN_ACCESS_PRIVILEGE
Fill source with correct value instead of null
for FirDefaultPropertySetter in light tree converter
2021-07-30 18:07:35 +03:00
Ivan Kochurkin b3d7ed569d [FIR] Implement INVISIBLE_SETTER 2021-07-30 18:07:34 +03:00
Nikolay Krasko ca4410aa53 Stop auto-generating expected test data on TeamCity in assertEqualsToFile 2021-07-30 17:46:45 +03:00
Sergey Igushkin edaf925b19 Reorder Gradle -Xplugin=... so that serialization goes first (KT-47921)
Ensure that the serialization plugin's artifact (and, possibly, some
other prioritized plugin artifacts) are put first to the -Xplugin=...
classpath passed to the compiler.

This fixes the conflict of the serialization plugin with some other
plugins altering the IR in unexpected ways.

Issue #KT-47921
2021-07-30 16:20:14 +04:00
Dmitriy Dolovov 033a9f1589 Bump konanVersion: 1.6.0 2021-07-30 14:52:08 +03:00
Ilya Matveev e45b13d582 [K/N][New MM] Check if asserts are enabled in thread state asserts 2021-07-30 10:30:50 +00:00
Aleksandr Samofalov 5ee87e126d KMA-51 Use local ObjCExportMapper in ObjCExportTranslatorMobile 2021-07-30 13:13:26 +03:00
Aleksandr Samofalov d72a399982 KMA-51 Create API to use ObjCExportTranslator to translate functions in IDE 2021-07-30 13:13:26 +03:00
Yahor Berdnikau 90d15f156b Fix toolchain may fail to find tools.jar and false-fail the build.
This may happen when build itself is running on JDK9+ and toolchain
is set to <=JDK1.8. CompilerEnvironment gets 'tools.jar' from the
current Gradle Daemon JDK, but there was a check if exception should be
thrown that uses 'javaVersion' from toolchain provided JDK.

Additionally also fixed 'tools.jar' was not provided for
 'KotlinCompileWithWorkers' task.

^KT-47940 Fixed
2021-07-30 09:59:49 +00:00
Yahor Berdnikau bab5a4a6c9 Allow to specify JDK for build.
For now it disables debug option.

^KT-47940 In progress
2021-07-30 09:59:49 +00:00
Alexander Gorshenev 9148094bbd Garbage collection capable wrappers for skia interop 2021-07-30 12:54:51 +03:00
Alexander Shabalin d9483ccb08 Enable stacktraces for RuntimeAssert, TODO 2021-07-30 08:22:32 +00:00
Pavel Kunyavskiy d18ade088d [K/N] Help message for disabling quarantine flag on dylibs in distribution 2021-07-30 08:17:45 +00:00
Elena Lepilkina 9142b03df5 [K/N][Samples] Use unsigned types in videoplayer 2021-07-30 08:05:44 +00:00
Dmitry Petrov ca5ebdc13c PSI2IR KT-44855 propagate smart cast information for property values 2021-07-29 21:41:50 +03:00
Mikhael Bogdanov cdbd0eb932 Reopen KT-47920 test and add missed .txt files
#KT-47920 Open
2021-07-29 19:52:59 +02:00
Mikhael Bogdanov 824d6ab5cc Update tests affected by 'ProhibitSimplificationOfNonTrivialConstBooleanExpressions' feature 2021-07-29 19:45:57 +02:00
Mikhael Bogdanov 1e2547d0d0 Temporary mute test-lombok-with-kapt test
#KT-47945
2021-07-29 19:45:57 +02:00
Mikhael Bogdanov 588952bc9a Fix maven tests 2021-07-29 19:45:57 +02:00
Mikhael Bogdanov a1bd728aef Update SNAPSHOT version in maven projects/tests 2021-07-29 19:45:57 +02:00
Mikhail Glukhikh 55f7bb2756 Fix FIR PSI consistency test (definitely not-null types) 2021-07-29 19:45:57 +02:00
Alexander Udalov d36c56497e Minor, improve CLI test internalArgOverrideOffLanguageFeature
Avoid disabling language features which cannot be disabled anymore.
2021-07-29 19:45:57 +02:00
Dmitriy Novozhilov 262c9e88d1 [FE 1.0] Fix remaining codegen spec tests 2021-07-29 19:45:57 +02:00
Denis.Zharkov ee68962c02 Ignore Jvm8RuntimeDescriptorLoaderTestGenerated::testMapRemove
For now, JavaResolverSettings in runtime are different from
default language version, so it might have a little bit different API surface

In future, it's worth considering changing JavaResolverSettings.Default
once default language version is changing

  #KT-47903
2021-07-29 19:45:57 +02:00
Mikhael Bogdanov 4fe846fb81 Fix test affected by InstantiationOfAnnotationClasses feature 2021-07-29 19:45:57 +02:00
Mikhael Bogdanov 1347ee8c7d Update DiagnosicTestGenerated affected by 'PrivateInFileEffectiveVisibility' feature 2021-07-29 19:45:57 +02:00
Denis.Zharkov d2ad421e0b Fix test data for definitelyNotNullType 2021-07-29 19:45:57 +02:00
Denis.Zharkov 8f484fcf88 Fix propagation of definitelyNotNull types from overrides 2021-07-29 19:45:57 +02:00
Victor Petukhov cba224b7b8 Update spec black box tests 2021-07-29 19:45:56 +02:00
Mikhael Bogdanov baaa615e09 Update FirOldFrontendDiagnosticsTestGenerated tests 2021-07-29 19:45:56 +02:00
Mikhael Bogdanov 70e4472c99 Update Fir2IrTextTestGenerated tests 2021-07-29 19:45:56 +02:00
Victor Petukhov d2a7434cff Update testdata 2021-07-29 19:45:56 +02:00