Commit Graph

95 Commits

Author SHA1 Message Date
Pavel Kirpichenkov b7ea590e23 [IDEA] Add HTML render for ambiguous callable references diagnostic
^KT-36125 Fixed
2020-03-31 12:04:01 +03:00
Dmitriy Novozhilov 76b3964e96 Update testdata according to change compiler version to 1.4 2020-01-17 10:33:50 +03:00
Yan Zhulanow 87e0a2d98c Debugger: Fix evaluation of function declarations with expression bodies (KT-32704)
Before this commit, the substituted FunctionDescriptor didn't have a source element.
As a result, 'CodeFragmentParameterAnalyzer.isCodeFragmentDeclaration' failed to recognize such a descriptor as fragment-local, and it was erroneously captured.
2019-10-24 21:33:00 +09:00
Dmitriy Novozhilov 5715c32216 [IDE-NI-MIGRATE] [OK] Enable only OI on some IDEA tests that unrelevant in NI 2019-05-06 11:35:59 +03:00
Denis Zharkov 2182be82e6 Fix message text for INCOMPATIBLE_ENUM_COMPARISON
^KT-28516 Fixed
2018-11-30 10:34:00 +03:00
Dmitry Petrov a86fe89aae Include file name for package-level members in diagnostics 2017-05-26 13:58:46 +03:00
Dmitry Petrov 7979663e6c Update testData for changed diagnostic messages 2017-05-26 13:58:46 +03:00
Dmitry Petrov a0a8beee82 Handle TypeAliasDescriptor in AdaptiveClassifierNamePolicy
(as ClassDescriptor)
2017-03-13 14:15:27 +03:00
Stanislav Erokhin b6fa10cf9e Disable some features when LV=1.1 API=1.0.
Feature list:
 - bound callable references
 - local delegated properties
 - coroutines.

#KT-16017 Fixed
2017-02-13 20:29:38 +03:00
Denis Zharkov 4ee818addf Add callee name to diagnostic about illegal suspension call
#KT-15938 Fixed
2017-02-08 11:07:26 +03:00
Stanislav Erokhin ec2eec33e3 Added hint url for coroutines and multiplatform diagnostics. 2017-01-28 03:25:45 +03:00
Dmitry Petrov de14d4abc8 KT-15748 Type alias constructor return type should have a corresponding abbreviation 2017-01-27 15:16:04 +03:00
Dmitry Petrov e6fcf20cf2 No variance elision in type alias substitution.
Add test with cyclic inheritance via type alias.
2016-11-22 10:04:47 +03:00
Dmitry Petrov 549ae59562 Inference for type alias constructor type arguments: better error reporting. 2016-11-10 14:54:11 +03:00
Dmitry Petrov 94d7bd7a6b KT-14641: Nested type alias reference via an instance is an error. 2016-11-10 14:54:11 +03:00
Dmitry Petrov 03d8aa272b Infer type arguments of type alias constructors. 2016-11-09 10:48:07 +03:00
Dmitry Petrov ed60674d13 KT-14498: Properly check variance in expanded types. 2016-10-28 18:02:15 +03:00
Valentin Kipyatkov 8baa9ba1de No parameter names in type of lambda expression and anonymous function 2016-10-11 23:38:54 +03:00
Valentin Kipyatkov 3bd39df587 No parameter names in types for error messages 2016-10-11 23:38:50 +03:00
Valentin Kipyatkov 41ee06ec96 Use parameter names in DescriptorRenderer 2016-10-11 23:38:49 +03:00
Alexander Udalov df680305ba Improve diagnostic message for UNSUPPORTED_FEATURE
Render lowercase words separated by spaces instead of CamelCase in the
diagnostic message
2016-10-04 10:24:43 +03:00
Dmitry Petrov 06101dba52 KT-13961 REDECLARATION not reported on private-in-file 'foo' vs public 'foo' in different file
Private-in-file declarations conflict with public overload-equivalent declarations
in other files in the same package.

Move functions for grouping possible redeclarations to OverloadResolver
(since they are used only there).

Refactor redeclarations / conflicting overloads reporting.
2016-10-03 11:50:29 +03:00
Denis Zharkov 6663054f4d Fix false positive "Cannot capture" error reporting
There is no need to report an error in case of non-top-level
capture conversion, just don't add relevant capture type in the system instead

If system can be solved successfully without captured type, then it's just fine
(see KT-13950)
In case of contradiction TYPE_INFERENCE_PARAMETER_CONSTRAINT_ERROR is reported

 #KT-13950 Fixed
2016-09-21 18:05:26 +03:00
Mikhail Glukhikh babf61ec19 Minor: message fixed in diagnostics test 2016-09-12 12:57:48 +03:00
Alexander Udalov 83000c50ff Remove quotes around visibility in invisible member diagnostic 2016-07-22 18:13:41 +03:00
Alexander Udalov d8db769823 Use empty list instead of ThrowingList in callable reference resolution
Clients of the call resolution do not expect to see a throwing list in call's
arguments, and it's wrong to make each of them check against the special case
that is the resolution of callable references

Fixes EA-69901
2016-06-07 12:42:45 +03:00
Pavel V. Talanov e397544aee Improve NONE_APPLICABLE ide renderer 2016-02-26 14:45:10 +03:00
Pavel V. Talanov 8cbc9eee3e Improve AMBIGUOUS_CALLS renderer 2016-02-26 14:45:09 +03:00
Pavel V. Talanov 5dcfdb3996 Test return type mismatch on override diagnostic rendering 2016-02-26 14:45:07 +03:00
Pavel V. Talanov 7ba4adf006 Add tests for diagnostics rendering 2016-02-26 14:45:06 +03:00
Pavel V. Talanov 4ab5aabfa0 Adjust existing test data for diagnostic messages 2016-02-26 14:45:06 +03:00
Valentin Kipyatkov 4cd7193047 KT-11018 Ctrl + Mouse Hover shows a var as val
#KT-11018 Fixed
2016-02-13 10:20:20 +03:00
Nikolay Krasko 3f5f892e1b Add html escaping for declaration names in calls (KT-10763)
#KT-10763 Fixed
2016-02-11 02:49:00 +03:00
Dmitry Petrov 4afe98a0f6 Better diagnostics for conflicting overloads.
Skip declarations without sources in reporting, not when determining redeclaration groups:
this allows emitting informative diagnostics for incremental compilation.
Provide containing declaration with "kind", e.g., "package '<root>'", "class A", and so on.
2016-02-03 15:53:07 +03:00
Dmitry Petrov 65f754ffca Fix KT-10764 IDEA doesn't show overload conflict between constructor and function...
When checking for overloads in package, consider functions and top-level class constructors as possibly conflicting between each other. NB OverloadUtil uses containing package scope from module descriptor.

Change diagnostic message for CONFLICTING_OVERLOAD: it's misleading in case of fun vs constructor conflict.

Add custom multifile test for diagnostics in IDE (probably not the best; should preprocess file content if it's required to check highlighting in multiple files, not only in the first file).

Add test for KT-10765 Incremental compilation misses overload conflict between constructor and function ...
2016-02-02 16:21:26 +03:00
Ilya Gorbunov f4822cd757 Fix testData in compiler: add collections and ranges package to fq-names. 2016-01-22 05:54:38 +03:00
Denis Zharkov e9693e987f Humanize type mismatch diagnostic caused by type projections
#KT-10581 Fixed
2016-01-19 11:05:41 +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
Yan Zhulanow a3ff3ffc45 Fix tests: "Placing function type parameters after the function name" error 2015-11-27 15:51:11 +03:00
Svetlana Isakova 9b440345a1 Do not render @NoInfer, @Exact annotations
For now they are always not rendered,
but later they should be rendered in descriptors, but omitted in error messages
2015-10-16 21:58:45 +03:00
Dmitry Petrov 5d9ee7efee Java 8 rules for method overrides:
- base class method wins against a (default) interface method,
so an abstract base class method should always be implemented
in a derived class;

- interface methods clash regardless of abstract/default
with possibly undefined behavior at run-time,
so a class or interface should always define its own method
for methods inherited from multiple interfaces and not from base class;

- meaningful diagnostics for class inheriting conflicting JVM signatures.
Since no override will happen under Java 8 rules,
ACCIDENTAL_OVERRIDE is misleading for this case;

- update testData.
2015-10-12 14:12:31 +03:00
Denis Zharkov 73799e2c3c Replace deprecated lambda syntax in testData
It's done with similar constructions where possible trying to preserve
intended behavior.
Some usages are removed because they test exactly the feature that
we are going to drop soon.
2015-09-25 08:29:25 +03:00
Michael Nedzelsky 32c66914fe fix tests in org.jetbrains.kotlin.idea.highlighter 2015-09-08 02:05:38 +03:00
Stanislav Erokhin 5ded315cbb Improved error reporting for candidates with wrong parameter count 2015-09-01 23:37:42 +03:00
Stanislav Erokhin 2ee8f1c454 Change outer scope for nested class and object -- removed implicit outer class receiver.
#KT-5362 Fixed
#KT-8814 Fixed
2015-08-18 21:26:42 +03:00
Svetlana Isakova 722a49767a Rename: TypeConstructorMismatch -> ParameterConstraintError 2015-07-10 15:05:12 +03:00
Ilya Gorbunov fb342de451 Ensure stable order is used when rendering list of resolved calls by sorting them with MemberComparator. 2015-05-21 19:07:19 +03:00
Dmitry Jemerov 625096466e IDE testdata: s/trait/interface 2015-05-13 16:13:13 +02:00
Denis Zharkov 6c46606f2b Fix constructors redeclaration message
#KT-6966 Fixed
2015-03-17 23:18:34 +03:00
Pavel V. Talanov 06916d98c6 default -> companion: replace all mentions of default and default object 2015-03-17 15:47:39 +03:00