Commit Graph

120 Commits

Author SHA1 Message Date
Mikhail Glukhikh 036b6c63f6 [FIR] During resolve, set correctly property reference type in delegate 2020-04-03 13:18:47 +03:00
Mikhail Glukhikh 8884cbe415 Introduce FIR_IDENTICAL for FIR vs old frontend tests #KT-36879 Fixed 2020-03-05 09:39:40 +03:00
Ilya Chernikov 6356807997 Reapply "Only create descriptors for candidates with lambda args"
#KT-36247 fixed
A lot of testdata changed because significanly less (error) descriptors
are created for unresolved types, so diagnostics became different.
2020-02-14 11:41:30 +01:00
Pavel Kirpichenkov 95a8060946 [NI] Don't report uninferred type parameter error on special functions
Type parameters can't be specified explicitly for special constructions.
Reporting this error does not help fixing the cause of it and needlessly
reveals implementation details.

^KT-36342 Fixed
2020-02-12 17:33:42 +03:00
simon.ogorodnik 34e6649d31 [FIR] Harden check of argument type properly
Before this commit, nullable argument could match not null parameter.
Now we require also correct nullability that breaks some cases
2020-02-03 16:45:18 +03:00
Mikhail Glukhikh e644edfe84 [FIR] Handle unresolved callable references more correctly 2020-01-23 12:32:39 +03:00
Dmitriy Novozhilov 2536fa0cd5 [FIR-TEST] Add new testdata generated after changes in previous commit 2019-12-12 16:11:46 +03:00
Pavel Kirpichenkov d9ef7d0c8a [NI] Update / mute diagnostics
Update diagnostics for new inference.
'Not enough information for parameter' should not be reported for
fake calls and functions with error return type, muted in tests.
2019-12-11 17:53:43 +03:00
Mikhail Zarechenskiy 515e666733 [NI] Fix exception on incomplete try/catch block
There was an inconsistency on creating PSI call and corresponding
 descriptor. See variable `catchBlocks` from visitor, it's created
 only if PSI elements are not null, but for descriptor parameters
 there wasn't such check

 #KT-32134 Fixed
 #EA-139748 Fixed
2019-07-01 12:59:37 +03:00
Dmitriy Novozhilov b4c8c79931 [NI] Add check for non-null argument type in arguments check
#KT-31461 Fixed
2019-05-23 12:22:42 +03:00
Mikhail Zarechenskiy 1e3db9ee7c [NI] Update test data for diagnostic tests 2019-04-25 16:19:37 +03:00
Dmitriy Novozhilov bfb13803d5 [NI] Fix reporting of overload resolution ambiguity 2019-04-19 14:46:22 +03:00
Dmitriy Novozhilov 9825984bc5 [NI] Update test data for diagnostic tests 2019-03-25 12:17:27 +03:00
victor.petukhov 46bd5ba107 Add alphabetical sorting diagnostics with same ranges 2019-02-14 12:31:42 +03:00
Mikhail Glukhikh f3555daa60 Report UNUSED_PARAMETER on main parameter in 1.3+ #KT-26999 Fixed 2018-10-25 19:10:39 +03:00
Dmitry Savvinov ea72c76a37 [NI] Testdata changes after fixes in error types 2017-12-07 12:49:56 +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
Mikhail Zarechenskiy fb72726f08 Resolve right part of equality with given descriptors 2017-08-07 18:01:15 +03:00
Mikhail Zarechenskiy 87a41293e8 Improve diagnostics on callable reference of unresolved class
#KT-10839 Fixed
2017-06-22 15:02:13 +03:00
Valentin Kipyatkov 7f0063013c Corrected test data 2016-10-11 23:38:52 +03:00
Valentin Kipyatkov 6b94e5fd34 Use parameter names from function type for invoke() function
#KT-435 Fixed
 #KT-9016 Fixed
2016-10-11 23:38:49 +03:00
Valentin Kipyatkov 41ee06ec96 Use parameter names in DescriptorRenderer 2016-10-11 23:38:49 +03:00
Alexander Udalov 5a6237b357 Refactor resolution of double colon expression LHS
Try resolving the LHS only when it looks (PSI-wise) like it could represent a
type element. This, for example, allows "illegal selector" error to be reported
on weird expressions like '""?.""::class'.

Also remove expression text from the "illegal selector" diagnostic, it's not
needed and can screw up the error message if the text is too big
2016-07-22 11:05:19 +03:00
Denis Zharkov 4725dd3028 Implement recovery for incomplete expression before declaration
It's needed when declarations are parsed as a part of previous expression
(see tests)

Currently we apply this kind of recovery in a conservative way,
only when declaration starts at the next line, and while
the condition could be relaxed, there's no need to do this

 #KT-4948 Fixed
 #KT-7118 Fixed
2016-07-15 18:59:31 +03:00
Denis Zharkov 3aa1a56cb9 Extend recovery set when expecting property accessor
#KT-12987 Fixed
2016-07-08 16:06:47 +03:00
Denis Zharkov f1026935a0 Add recovery for properties without name
If property name is parsed on the next line and declaration is invalid
(no receiver/type/initializer), treat that name as it does not belong to property

 #KT-12987 In Progress
2016-07-08 16:06:47 +03:00
Denis Zharkov 46f11a5ec4 Add val/var tokens in parameter name recovery set
Recovery after val/var everywhere beside value parameters works
properly without this change

 #KT-7915 Fixed
2016-07-08 16:06:47 +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
Ilya Gorbunov f4822cd757 Fix testData in compiler: add collections and ranges package to fq-names. 2016-01-22 05:54:38 +03:00
Pavel V. Talanov 1c4d4f3e36 Create class descriptors for local classes in illegal positions
Typecheck code in illegal selector position
Fixes exceptions on "val p = A.class" erroneous code
2015-12-29 15:56:44 +03:00
Mikhail Glukhikh c8b50eec1e Enum.values: deprecation (warning) --> deprecation (error) 2015-12-11 11:11:42 +03:00
Dmitry Jemerov e97e82d119 use terms "lambda expression" and "anonymous function" instead of "function literal" and "function expression" 2015-12-09 13:55:40 +01:00
Yan Zhulanow 9d1af5a17e Fix tests: "infix modifier required" and "operator modifier required" errors 2015-11-27 15:51:11 +03:00
Mikhail Glukhikh 89e56093a2 Limit "always null" scope: only for !!, is and dot; senseless comparison rolled back; "smart constant" information for nulls #KT-10029 Fixed 2015-11-25 18:26:08 +03:00
Mikhail Glukhikh dc60c62781 Enum.values is now deprecated but Enum.values() is no more deprecated 2015-11-23 17:29:36 +03:00
Dmitry Petrov 7b432c878a Diagnostics improvements for corner cases
(class/package qualifier in non-qualifier position).
2015-11-18 16:27:21 +03:00
Dmitry Petrov 9856af48ca Drop createQualifier: testData update 2015-11-18 14:35:53 +03:00
Mikhail Glukhikh 2d9fbf5696 Always null detection 2015-11-09 16:36:34 +03:00
Mikhail Glukhikh d6988ad69e Get rid of FIELD_IDENTIFIER at syntax level, two errors dropped, a set of tests fixed / deleted #KT-9539 Fixed 2015-10-21 16:36:55 +03:00
Alexey Tsvetkov 1e2256207c Update test data 2015-10-19 20:45:02 +03:00
Svetlana Isakova cb34498278 Check nullability in initial constraints
except constraints for receiver type (it can be accessed via safe call)
2015-10-19 14:15:06 +03:00
Denis Zharkov 1c02231cda Regenerate rendered descriptors after transforming Enum.values to property 2015-10-17 17:46:16 +03:00
Denis Zharkov bd37a10677 Transform *Array.size to properties 2015-10-16 18:16:02 +03:00
Mikhail Glukhikh f8a356747e Stdlib rename: 'name' and 'ordinal' are now properties in Enum, same name functions are deprecated 2015-10-14 20:40:13 +03:00
Alexey Tsvetkov 0e606a3210 Prohibit named parameters in function types in supertype position 2015-10-13 16:07:55 +03:00
Alexey Tsvetkov 90849a67ae Prohibit annotations, modifiers and default values for parameters in function type
#KT-7619 fixed
2015-10-13 16:07:55 +03:00
Mikhail Glukhikh 6914d09297 Old backing field with dollar is now forbidden 2015-10-09 21:06:26 +03:00
Dmitry Jemerov 7c20630272 diagnostics for deprecated syntax of function type parameter list 2015-10-06 16:20:47 +02:00