Commit Graph

29 Commits

Author SHA1 Message Date
Ivan Kochurkin f046f2964b [FIR] Add PLATFORM_CLASS_MAPPED_TO_KOTLIN 2021-11-24 23:13:41 +03:00
Victor Petukhov 54b9f39b3a Update tests after rebase 2021-05-28 15:36:24 +03:00
Victor Petukhov 76c15e4444 Don't update null recorded type prematurely in ResolvedAtomCompleter 2021-05-28 15:36:23 +03:00
Victor Petukhov fd5169186e Update test for the builder inference and add new ones 2021-05-28 15:36:21 +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
Dmitriy Novozhilov cd890d5833 [Test] Disable UNUSED_* diagnostics in tests which are not belong to contolFlowAnalysis suite 2021-03-29 16:12:29 +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
Pavel Kirpichenkov 8c52bb4212 Add frontend checks for missing dependency supertypes
Call checker and declaration checker are used in order to preserve backward compatibility.
Attempt to use classifier usage checker was not good enouth,
since not all errors found with it would actually be reported before.
For example types and constructor calls don't cause supertypes to resolve,
so missing supertypes would not lead to errors in case they are the only use of class name.

Updated tests failing due to missing Java dependencies in superclasses.
2019-11-18 12:06:41 +03:00
Mikhail Zarechenskiy ac0a1d984f [NI] Don't return resulting call if return type has uninferred types 2019-04-25 16:19:38 +03:00
Mikhail Zarechenskiy 1e3db9ee7c [NI] Update test data for diagnostic tests 2019-04-25 16:19:37 +03:00
victor.petukhov 46bd5ba107 Add alphabetical sorting diagnostics with same ranges 2019-02-14 12:31:42 +03:00
Alexander Udalov 1f0fb4823f Simplify DefaultImportProvider, introduce "low priority imports"
Previously, packages `java.lang` and `kotlin.jvm` were imported on JVM
by default on the same rights, causing problems when the same classifier
existed both in `java.lang` and `kotlin.jvm`. Since the only known case
of such conflict were type aliases to JVM classes, the corresponding
classes (expansions of those type aliases) were manually excluded from
default imports. This made the code in DefaultImportProvider complicated
and resulted in multiple problems, regarding both correctness and
performance (see 82364ad3e5, a9f2f5c7d0, dd3dbda719).

This change adds a new concept, a "low priority import", and treats
`java.lang` as such. Since these imports are now separated from the rest
of default imports in LazyImportScope via secondaryClassImportResolver,
conflicts between classifiers are handled naturally: the one from
`kotlin.jvm` always wins (unless the one from `java.lang` is imported
explicitly, of course). This approach is simpler, safer and does not
require any memory to cache anything.

Skip ResolveToJava.kt test for javac-based resolve; it now fails because
of a weird issue which I didn't have time to investigate (this is OK
because it's a corner case of an experimental functionality)
2018-07-16 13:45:11 +02: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
Stanislav Erokhin bebc75c8ef Set reference target and report custom error instead unresolved reference for cases: interface, generic parameter, object + invoke, class without companion.
#KT-2787 Fixed.
2016-09-01 18:01:55 +03:00
Denis Zharkov 17c906658d Transform Throwable members to properties 2015-10-14 20:39:59 +03:00
Stanislav Erokhin 8efbf4fc32 Fixed testdata -- removed package import 2015-09-18 21:00:20 +03:00
Dmitry Jemerov f374eec8f1 deprecating types after colon 2015-04-29 16:33:24 +02:00
Valentin Kipyatkov 1f17d7adcd Changed language sematics: imports with '*' do not import packages anymore 2014-12-26 15:45:01 +03:00
Svetlana Isakova 96db2ecabd added different errors instead of ERROR_COMPILE_TIME_VALUE with different text
check type for constants in DataFlowUtils
2013-09-13 16:04:17 +04:00
Andrey Breslav e3175c66e8 Fixing failed tests: do not report anything on casts that can never succeed 2013-09-05 15:03:37 +04:00
Andrey Breslav c849a0c4e3 Redundant/conflicting projections 2012-11-24 15:59:16 +04:00
Svetlana Isakova 126f5e1668 check debug info errors in diagnostic tests 2012-11-16 15:32:59 +04:00
Svetlana Isakova cd5521d6dc rename error 2012-09-07 19:03:07 +04:00
Svetlana Isakova 7c828b9ff7 diagnostic tests changes after collections mapping 2012-09-05 18:55:16 +04:00
Svetlana Isakova 31831f2433 added 'class has Kotlin analog' error
to existing diagnostic tests
2012-09-05 18:55:16 +04:00
Svetlana Isakova 3739301566 TYPE_INFERENCE_FAILED changed in tests
to concrete type inference error
2012-07-20 19:34:52 +04:00
Andrey Breslav 3d8d92c7d3 JetDiagnosticsTest migrated to TestGenerator
- test data files renamed from *.jet to *.kt
2012-07-10 14:48:11 +04:00