Commit Graph

31 Commits

Author SHA1 Message Date
Mikhail Glukhikh 8884cbe415 Introduce FIR_IDENTICAL for FIR vs old frontend tests #KT-36879 Fixed 2020-03-05 09:39:40 +03:00
Mikhail Glukhikh e3721ed406 [FIR] Implement bare type modification with known type arguments 2020-02-11 16:09:21 +03:00
Denis Zharkov 47ecaa5b06 FIR: Fix scope intersection types
Otherwise overload resolution ambiguity is reported in the test
2020-01-30 17:12:50 +03:00
Mikhail Glukhikh fe8d68ecc7 Use different transformers per module in FIR diagnostics tests
Before this commit, we used same transformers for all modules,
which provoked using same ScopeSession for all modules.
Now we re-create transformers for any new module.
This fixes some problems with incorrect caching in ScopeSession.

NB: this provokes ambiguities in some old FE tests,
mostly they're correct (same as old FE).
2019-12-19 17:16:14 +03:00
Dmitriy Novozhilov 2536fa0cd5 [FIR-TEST] Add new testdata generated after changes in previous commit 2019-12-12 16:11:46 +03:00
Alexander Udalov 6f9441d3f4 Do not output empty non-root packages in tests with txt
Mostly to avoid listing every internal package in
kotlin-stdlib/kotlin-reflect, as in
https://github.com/JetBrains/kotlin/blob/acd5b62148d797ffd24c4811d1d663f0c1ae7885/compiler/testData/diagnostics/testsWithUnsignedTypes/conversions/conversionOfSignedToUnsigned.txt#L144
2018-08-06 13:43:32 +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
Alexander Udalov c1eebacd55 Do not render declarations from other modules in diagnostic tests
Because PackageViewDescriptor may consist of several package fragments from
different modules (see LazyPackageViewDescriptorImpl#fragments), we now filter
out fragments from irrelevant modules before rendering them into the .txt
2016-11-25 20:50:21 +03:00
Alexander Udalov 167ab1f860 Introduce "-api-version" CLI option
The `@SinceKotlin("X.Y.Z")` annotation now hides a particular declaration from
resolution when the API version specified by the `-api-version` option is
_less_ than X.Y.Z. The comparison is performed as for versions in Maven:
MavenComparableVersion is in fact a copy of
org.apache.maven.artifact.versioning.ComparableVersion.

Also support "!API_VERSION" directive in diagnostic tests

 #KT-14298 Fixed
2016-10-11 17:46:01 +03:00
Alexander Udalov 610c549225 Filter out equivalent calls before reporting "none applicable"
If a module is configured in such a way that the same function appears multiple
times via different dependencies, it's not helpful to report "none of the
following functions can be called", listing the same function multiple times
2016-10-02 21:03:30 +03:00
Denis Zharkov b4bb92d136 Fix overload resolution ambiguity for types intersection
There are two different forms of types intestion:
1. Type parameters with multiple bounds
2. Smart casts

The problem was that when member scope of type intersection contained
effective duplicates and that lead to overload resolution ambiguity in
strange cases like `x.hashCode()`

For first type we do effectively the same thing as when building member
scope for class extending several interfaces: group all descriptors by
both-way-overridability relation and then choose most-specific in each
group.

For smart casts we do basically the same thing but with special
treatments:
1. From all descriptors that _equal_ to most specific we choose
   the one that works without smartcast if possible (i.e. we choose first from candidates list)
2. If smart-cast value seems to be unstable we use only member scope
   of receiver type + all descriptors from smart cast possible types
   that has incompatible signature. If we'd include all of them and
   choose one as more specific, and it would lead to false
   SMART_CAST_IMPOSIBLE (see test unstableSmartCast.kt)

 #KT-3996 Fixed
 #KT-10315 Fixed
2015-12-15 16:18:31 +03:00
Alexander Udalov 239502368a Update test data for tower resolution algorithm
- locals win
- unary calls to plus/minus are not supported in favor of unaryPlus/unaryMinus
- unqualified nested classes are temporarily reported as unresolved
- function without receiver win against extension function
- explicit import win against star import
2015-12-11 17:01:02 +03:00
Mikhail Glukhikh 46f4191185 Unnecessary safe call is now reported in CallExpressionResolver, removed code duplication for safe call receivers
See also KT-10175
2015-11-25 16:19:48 +03:00
Michael Nedzelsky 57205f5721 drop BASE_WITH_NULLABLE_UPPER_BOUND 2015-10-14 20:51:01 +03:00
Mikhail Glukhikh 0a0bfdacb1 Names containing only '_' are deprecated (declarations, parameters, import aliases, labels, but not backquoted names) 2015-09-25 18:57:58 +03:00
Michael Nedzelsky bc5c9065d2 fix tests in org.jetbrains.kotlin.checkers 2015-09-08 02:04:32 +03:00
Stanislav Erokhin d015f713cb KT-6244 Overloads with no default parameters should take over ones with defaults
#KT-6244 Fixed
2015-09-01 23:37:43 +03:00
Dmitry Jemerov 4bdf598bfe compiler testdata: s/trait/interface 2015-05-12 19:43:17 +02:00
Dmitry Jemerov 9975bb8935 replace 'trait' keyword with 'interface' in user-visible messages and code generation tools 2015-05-12 11:49:37 +02:00
Andrey Breslav 0eee83b6ec Lazy logs removed 2014-11-21 18:59:45 +03:00
Svetlana Isakova 2a83053355 Updated lazy log tests 2014-11-21 14:02:45 +03:00
Stanislav Erokhin b7c473f59e Update lazy.log files 2014-11-17 17:45:01 +03:00
Alexander Udalov 4f0d83a7fe Update lazy logs after field rename 2014-11-11 18:35:39 +03:00
Andrey Breslav 4892369cf4 Diagnostic tests are logging their lazy activity 2014-11-10 17:24:04 +02:00
Alexander Udalov 3a8ad45dec Append newline to EOF for .txt test data files
Reverts and fixes 102f0d3
2014-10-21 03:18:27 +04:00
Svetlana Isakova ce01c61811 Rename: auto cast -> smart cast 2014-10-01 18:52:52 +04:00
Nikolay Krasko e796f88b38 Regenerate test data with constructed descriptors for diagnostics tests 2014-09-18 17:58:23 +04:00
Andrey Breslav 37532e8d02 Compare return types when structurally comparing callables 2014-06-02 22:05:34 +04:00
Andrey Breslav 7f60ccf663 Support equalityAxioms in isSubtypeOf() 2014-06-02 22:05:33 +04:00
Andrey Breslav 204fa76691 When checking overrides, compare methods structurally
Because they may come from different copies of the same class from different modules
2014-06-02 22:05:28 +04:00