Commit Graph

1695 Commits

Author SHA1 Message Date
Ilya Kirillov 0130ecd21d FIR IDE: fix CCE in getKtExpressionType on assignment target 2021-03-07 19:48:08 +01:00
Ilya Gorbunov 9cc8f44390 Support mod and floorDiv extensions in constant evaluator
Ignore evaluation tests for floorDiv and mod with FIR for now.
2021-03-05 23:46:57 +03:00
Andrei Klunnyi a0b901b23a Revert "[FIR]: sealed hierarchy processor for IDE"
This reverts commit e6ccdff2
2021-03-05 16:37:47 +01:00
Andrei Klunnyi e6ccdff2f7 [FIR]: sealed hierarchy processor for IDE
From now on sealed declarations get resolved with the help of
FirIdeSealedHierarchyProcessor. This change entails correct IDE side
check for sealed when exhaustiveness.
2021-03-05 10:20:19 +00:00
Ilya Gorbunov 7e2c365b79 Generate docs for floorDiv and mod and improve docs for div and rem
Refactor operator documentation generation for primitives and unsigned
types so that it is easier to specialize it.

Manually sync docs of numeric types in js-ir stdlib.

 KT-26234
2021-03-05 07:32:16 +03:00
Ilya Gorbunov 50d4979531 Floor division and remainder for numeric types KT-26234
- floorDiv/mod for unsigned types
- floorDiv/mod for signed types
- mod for floating point types

- mod return type: same as divisor for integer types

- Update JS API dump
- Avoid triggering division overflow in tests due to K/N
- Workaround failing test in JS-legacy
2021-03-05 07:32:16 +03:00
Ilya Kirillov 70c98d34d2 FIR IDE: add test which check that every declaration is visited single time during diagnostic collection 2021-03-02 09:16:05 +01:00
Ilmir Usmanov d67e4f0c48 Rename inline class -> @JvmInline value class in stdlib and compiler 2021-02-25 16:06:51 +01:00
Alexander Udalov addabae8d2 IR: move frontend-dependent code into implementations in psi2ir 2021-02-24 19:07:38 +01:00
Alexander Udalov d991a3e40f IR: simplify initialization cycle of TypeTranslator/ConstantValueGenerator 2021-02-24 19:07:38 +01:00
Tianyu Geng 56854a8b1a FIR IDE: register quickfix for the following
1. NON_ABSTRACT_FUNCTION_WITH_NO_BODY
  2. ABSTRACT_PROPERTY_IN_NON_ABSTRACT_CLASS
  3. ABSTRACT_FUNCTION_IN_NON_ABSTRACT_CLASS
2021-02-19 13:16:42 +01:00
Ilya Kirillov b08eb6cf4c FIR IDE: specify behaviour of HL API getOverriddenSymbols
- Split it into two functions getAllOverriddenSymbols and getDirectlyOverriddenSymbols
- Implement tests for getOverriddenSymbols
- temporary mute inheritance.kt light classes test
2021-02-19 11:49:57 +01:00
Vladimir Dolzhenko 8783ebc352 Report highlight errors to WolfTheProblemSolver
Relates to #KT-37702
#KTIJ-1246 Fixed

Original commit: bd222a5255c2fd6f4abfce3115f81733ef9a39f3
2021-02-19 05:46:04 +00:00
Ilya Kirillov e8f3ebdd19 FIR IDE: introduce HLRedundantVisibilityModifierInspection by extended checker 2021-02-16 15:23:18 +01:00
Mark Punzalan 4e44804c77 FIR IDE: Add quickfix for INAPPLICABLE_LATEINIT_MODIFIER.
Also changed FE1.0 checker and all related fix factories to report error
on the declaration instead of the lateinit modifier. This is consistent
with the direction of all checkers in FIR (no reporting on modifiers).
2021-02-15 19:37:14 +01:00
Roman Golyshev b9d074051f FIR IDE: Add separate tests for FIR reference shortening 2021-02-12 10:53:06 +00:00
Mark Punzalan 7962224804 FIR IDE: Add quickfix for VAR_OVERRIDDEN_BY_VAL. 2021-02-11 11:11:00 +01:00
Yaroslav Chernyshev 17fc10a8af Mark obsolete Gradle JVM options as Deprecated with Error
Options `includeRuntime`, `noStdlib` and `noReflect` were affected
#Fixed KT-44361
2021-02-10 21:21:03 +03:00
Ilya Kirillov 91e135888d FIR IDE: introduce HLSpecifyExplicitTypeForCallableDeclarationIntention and HLRedundantUnitReturnTypeInspection 2021-02-09 17:15:41 +01:00
Ilya Kirillov 6c81d9848d FIR IDE: introduce ChangeReturnTypeOnOverrideQuickFix 2021-02-09 17:15:31 +01:00
Ilya Kirillov 9304056901 FIR IDE: add quick fix tests 2021-02-09 17:15:30 +01:00
Ilya Gorbunov 87e130e77a Remove obsolete diagnostics suppression
The diagnostic NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS is now
obsolete because internal constructors of inline classes became allowed.
2021-02-03 18:23:53 +03:00
Vladimir Dolzhenko 913c298be8 Kotlin highlight passes are reworked
#KT-37702 Fixed
2021-02-01 13:18:38 +00:00
Dmitriy Novozhilov 771600077c [Test] Fail if there are changes in generated fir tree files in teamcity build 2021-02-01 10:18:37 +03:00
Dmitriy Novozhilov 297288e984 [Test] Don't generate new files in GeneratorsFileUtil in teamcity mode 2021-02-01 10:18:37 +03:00
Alexander Udalov 1deb317e0d Update and regenerate incremental compilation tests for 1.5
Set TargetBackend.JVM_IR for these tests by default; remove the
generated IR-based test and add a new old-backend-based test. This fixes
the issue where some (3) of these tests were not properly ignored
because of incorrect target backend used in the test generator.

Also update test data for some tests which use local functions, which
are not generated to separate anonymous classes in JVM IR.
2021-01-28 13:19:27 +03:00
Roman Artemev 04777d2ff2 [IC TEST] Generate legacy js multi module IC tests 2021-01-26 19:23:24 +03:00
Roman Artemev 5b1c70a430 [KLIB IC] Generate multi module klib IC tests 2021-01-26 19:23:24 +03:00
Dmitriy Novozhilov e742af5444 [Test] Run fir diagnostics tests with light tree in sequential mode
In parallel mode many tests are failing so it's temporary workaround
2021-01-15 11:16:28 +03:00
Dmitry Savvinov d6c27608ac Minor: remove effectively unused test runner 2021-01-14 17:28:14 +03:00
Dmitriy Novozhilov 3c2079c926 [Test] Compute target backend in test generator automatically using reflection 2021-01-12 18:35:16 +03:00
Alexander Udalov 742fef9042 Rewrite generator for OperationsMapGenerated
Do not generate operations as lambdas; instead use `when` over
strings/enums, which is generated to tableswitch in the bytecode.

This reduces the proguarded compiler jar size by ~0.57%.

 #KT-23565 Fixed
2021-01-12 14:38:41 +01:00
Dmitriy Novozhilov d15c7861b2 [TEST] Invert dependency between :test-generator and :tests-common modules
This is needed to provide ability for declaring new implementations of
  test generators, based on existing infrastructure, which won't add
  dependency on :compiler:tests-common

Also this commit removes implicit dependency on :compiler:tests-common
  from :compiler:tests-common-new
2020-12-16 19:52:29 +03:00
Dmitriy Novozhilov 9e2d691425 [TEST] Move utils for checking all files presented to KtTestUtil
This is needed to remove dependency on :tests-common from module
  with abstract test generators
2020-12-16 19:52:27 +03:00
Dmitriy Novozhilov 64ce307f7f [TEST] Drop mechanism for muting tests with .mute files
This mechanism is deprecated and replaced with muting in database (.csv files)
2020-12-16 19:52:27 +03:00
Dmitriy Novozhilov f8ad096abb [TEST] Mute tests in IC JS Klib tests using exclude pattern instead of .mute file 2020-12-16 19:52:27 +03:00
Dmitriy Novozhilov 32fda13ef9 [TEST] Implement test generators for junit 5 based tests 2020-12-16 19:52:23 +03:00
Dmitriy Novozhilov c8f3a4802e [TEST] Introduce test-infrastructure-utils module and extract common test utilities here 2020-12-16 19:52:22 +03:00
Dmitriy Novozhilov 23c088afd6 [TEST-GEN] Reorganize package structure in :generators:test-generator module 2020-12-16 19:52:20 +03:00
Dmitriy Novozhilov 380e8a3814 [TEST-GEN] Extract run of TestGenerator to top of test generation DSL 2020-12-16 19:52:19 +03:00
Dmitriy Novozhilov 2a73aaba4d [TEST-GEN] Move all generation data to TestGroup.TestClass 2020-12-16 19:52:19 +03:00
Dmitriy Novozhilov c51ea6b142 [TEST-GEN] Create abstract TestGenerator and move current generator logic to TestGeneratorImpl 2020-12-16 19:52:19 +03:00
Dmitriy Novozhilov d45fb4dfd8 [TEST-GEN] Extract logic of generating test methods into separate abstraction MethodGenerator 2020-12-16 19:52:19 +03:00
Dmitriy Novozhilov 2acbe96f15 [TEST-GEN] Convert Test Generation DSL classes from java to kotlin 2020-12-16 19:52:19 +03:00
Dmitriy Novozhilov 31bccb4fb0 [TEST-GEN] Rename .java to .kt 2020-12-16 19:52:18 +03:00
Dmitriy Novozhilov 580d2ed693 [TEST-GEN] Add some comments to TestGenerationDSL 2020-12-16 19:52:18 +03:00
Igor Yakovlev c2bf124d86 [FIR IDE] File symbol scope and symbol test 2020-12-16 12:29:54 +03:00
Ilya Kirillov 835577383b FIR IDE: introduce expected type provider for return expressions 2020-12-15 22:15:56 +01:00
Ilya Kirillov 299f36183c FIR IDE: add tests for completion weighers from old testdata 2020-12-15 22:15:53 +01:00
Ilya Kirillov c61d4b5f9c FIR IDE: introduce return statement target provider 2020-12-15 22:15:51 +01:00