Commit Graph

83 Commits

Author SHA1 Message Date
Victor Petukhov 2bdbbdd1a7 Commit delegation expression's trace with errors if we couldn't extract type info for it
^KT-44843 Fixed
2021-09-30 20:08:39 +03:00
Ivan Kochurkin cd6384eb20 [FIR] Fix handling of WRONG_MODIFIER_TARGET
Implement DEPRECATED_MODIFIER, DEPRECATED_MODIFIER_FOR_TARGET, REDUNDANT_MODIFIER_FOR_TARGET
2021-08-13 18:32:27 +03:00
Andrey Zinovyev 1cb34541bd [FIR] Fixes after delegation scope rework 2021-07-08 18:13:52 +03:00
Andrey Zinovyev 78519f851e [FIR] Implement VAR_OVERRIDDEN_BY_VAL_BY_DELEGATION diagnostic 2021-07-08 18:13:43 +03:00
Andrey Zinovyev c98cd3b190 [FIR] Implement properties types mismatch on inheritence
PROPERTY_TYPE_MISMATCH_ON_INHERITANCE,
VAR_TYPE_MISMATCH_ON_INHERITANCE,
PROPERTY_TYPE_MISMATCH_BY_DELEGATION
2021-07-08 18:13:41 +03:00
Andrey Zinovyev 8c7ee0b714 [FIR] Implement RETURN_TYPE_MISMATCH_BY_DELEGATION diagnostic 2021-07-08 18:13:40 +03:00
Andrey Zinovyev 94da1e37aa [FIR] Implement RETURN_TYPE_MISMATCH_ON_INHERITANCE diagnostic 2021-07-08 18:13:38 +03:00
Denis.Zharkov a77cbb8f63 FIR: Rework FirNotImplementedOverrideChecker around delegated members reporting 2021-07-01 17:49:30 +03:00
Ivan Kochurkin fb9ce06ff5 [FIR] Implement DELEGATION_NOT_TO_INTERFACE 2021-06-29 02:00:11 +03:00
Victor Petukhov 54b9f39b3a Update tests after rebase 2021-05-28 15:36:24 +03:00
Victor Petukhov 4a767c597e Don't report the same diagnsotics several times 2021-05-28 15:36:23 +03:00
Denis.Zharkov ddbdfafa79 Remove OI/NI attributes from test data 2021-05-25 13:28:27 +03:00
Denis.Zharkov 2ecba6ac39 Remove WITH_NEW_INFERENCE directive from all tests
This directive anyway does not make test run twice with OI, and with NI
It only once run the test with specific settings (// LANGUAGE)
and ignores irrelevant (OI or NI tags)
2021-05-25 13:28:26 +03:00
Denis.Zharkov 010a0c6cdc FIR: Update test data (delegate inference)
Changed data looks correct
2021-05-20 17:24:35 +03:00
Denis.Zharkov 00821bbc63 FIR: Update test data (repeated diagnostics)
They are a bit redundant, but it needs additional work to be done
to avoid them
2021-05-20 17:24:33 +03:00
Mikhail Glukhikh 0f9f63400e FirSupertypesChecker: implement six more diagnostics 2021-05-13 16:13:43 +03:00
Mikhail Glukhikh 67d1c35f19 FIR: report MANY_INTERFACES_MEMBER_NOT_IMPLEMENTED also on interfaces 2021-05-12 17:50:27 +03:00
Mikhail Glukhikh 818c54e3a6 FIR: report ABSTRACT_*_NOT_IMPLEMENTED on appropriate intersections 2021-04-09 14:52:34 +03:00
Mikhail Glukhikh 42d53dd954 FIR: introduce delegated & overridden conflict checks 2021-04-02 10:24:20 +03:00
Mikhail Glukhikh 566dc434cc FIR: introduce MANY_*_MEMBER_NOT_IMPLEMENTED diagnostic 2021-04-02 10:24:20 +03:00
Dmitriy Novozhilov cd890d5833 [Test] Disable UNUSED_* diagnostics in tests which are not belong to contolFlowAnalysis suite 2021-03-29 16:12:29 +03:00
Mikhail Glukhikh 648bf99842 FIR: temporarily drop parent manipulation code around super type entries 2021-03-26 13:05:42 +03:00
Mikhail Glukhikh 9ce8420491 FIR: introduce not implemented checker 2021-03-24 16:07:25 +03:00
Jinseong Jeon 6b5ee6c9f9 FIR checker: warn redundant open in interface members properly 2021-01-15 14:38:37 +03:00
Dmitriy Novozhilov 6296f6dc33 [FE] Don't throw assertion in OverrideResolver if directOverridden is empty
Those descriptors may be empty in case user made a mistake and tried to
  delegate implementation of abstract class instead of interface (and
  we don't add functions from abstract class to overriden descriptors
  of fake overrides in case of delegation by)

#KT-40510 Fixed
2020-12-18 13:40:14 +03:00
Dmitriy Novozhilov e6b5cb5216 [TD] Update diagnostics test data due to new test runners
Update includes:
- Changing syntax of `OI/`NI` tags from `<!NI;TAG!>` to `<!TAG{NI}!>`
- Fix some incorrect directives
- Change order of diagnostics in some places
- Remove ignored diagnostics from FIR test data (previously `DIAGNOSTICS` didn't work)
- Update FIR dumps in some places and add `FIR_IDENTICAL` if needed
- Replace all JAVAC_SKIP with SKIP_JAVAC directive
2020-12-16 19:52:25 +03:00
Nick 61e21dadec [FIR] Add 3 type mismatch diagnostics 2020-08-24 11:06:12 +03:00
Ilya Chernikov 70c89a28e1 Stop subtyping constraint search if equality constraints for...
all not fixed type vars are found
#KT-35626 fixed
2020-03-12 08:02:45 +01:00
Mikhail Glukhikh 8884cbe415 Introduce FIR_IDENTICAL for FIR vs old frontend tests #KT-36879 Fixed 2020-03-05 09:39:40 +03:00
Dmitriy Novozhilov 2536fa0cd5 [FIR-TEST] Add new testdata generated after changes in previous commit 2019-12-12 16:11:46 +03:00
Mikhail Zarechenskiy bcc8802014 [NI] Avoid constraints from expected type for effectively empty system
Expression will be checked against expected type later.

 Theoretically, this is not very good, but it aligns with the old
 inference, plus it helps avoiding multiple type mismatch diagnostics.
2019-04-17 12:55:12 +03:00
victor.petukhov 46bd5ba107 Add alphabetical sorting diagnostics with same ranges 2019-02-14 12:31:42 +03:00
Mikhail Glukhikh e76debb12b Report UNUSED_PARAMETER in setter #KT-21129 Fixed 2018-05-04 18:04:57 +03:00
Mikhail Zarechenskiy 8757298994 Add diagnostics to test data from NI 2017-11-29 02:54:26 +03:00
Mikhail Zarechenskiy a71238bf94 Place !WITH_NEW_INFERENCE directive to diagnostics test data 2017-11-29 02:53:49 +03:00
baratynskiy 01883a41cb javac-wrapper: refactoring, fixes and tests 2017-08-29 18:01:36 +03:00
Denis Zharkov bc564af2fc Regenerate mockJDK using openJDK 7 2017-06-24 17:26:01 +03:00
Alexander Udalov 8dc4fa62ac Minor, drop unused directive and test
The directive was only used in this test and it had no effect on the
behavior of the test. The test is removed because it's equivalent to
simple.kt in the same directory
2017-04-03 18:05:04 +03:00
Stanislav Erokhin b033ad1b2b Add positioning strategy DECLARATION_NAME for DELEGATED_MEMBER_HIDES_SUPERTYPE_OVERRIDE. 2017-01-28 03:25:44 +03:00
Mikhael Bogdanov 0006a04b01 Report warning on hided override by delegation when compile to 1.0 version 2017-01-26 14:32:33 +01:00
Alexander Udalov e8c9e81235 Minor, move and rename test data directory 2016-12-20 17:29:30 +03:00
Alexander Udalov ca886ecb8d Do not report "delegation member hides override" when hidden member is final
This situation is erroneous because OVERRIDING_FINAL_MEMBER_BY_DELEGATION is
already reported, no need to report another error
2016-12-20 17:29:17 +03:00
Mikhael Bogdanov 761aa9df09 Report error when delegation method hides superttype override
#KT-12531 Fixed
2016-12-16 13:17:28 +01:00
Mikhael Bogdanov 686b698d80 Test data update 2016-12-16 13:17:27 +01:00
Denis Zharkov bb1b8cca20 Fix AssertionError in CodegenUtil.getDelegates
Change getAllOverriddenDescriptors contracti, now it returns
original (not substituted) descriptors without any duplicates.

First of all it's necessary in CodegenUtil.getDelegates to avoid
duplicates (see assertion there), but also it's convenient for all
other usages of this method

 #KT-8154 Fixed
2016-09-28 11:40:35 +03:00
Denis Zharkov c884cffeea Prohibit return type mismatch for delegation members
#KT-13952 Fixed
 #KT-13005 Fixed
2016-09-28 11:40:20 +03:00
Mikhail Glukhikh 9a69b8b7b5 REDUNDANT_OPEN_FOR_INTERFACE warning: reported for open members without implementation #KT-12452 Fixed 2016-05-24 14:25:27 +03:00
Denis Zharkov d0acb3674a Fix rendered testData
New members in enum member scope
2016-05-16 15:38:13 +03:00
Alexander Udalov 1b8f934b54 Delete deprecated enum 'values' property 2016-02-19 22:28:44 +03:00
Mikhail Glukhikh c8b50eec1e Enum.values: deprecation (warning) --> deprecation (error) 2015-12-11 11:11:42 +03:00