Commit Graph

133 Commits

Author SHA1 Message Date
Dmitriy Novozhilov d57fa859c8 [FIR] Implement builders for leaf nodes of FIR tree 2020-02-10 10:54:03 +03:00
Dmitriy Novozhilov 76b3964e96 Update testdata according to change compiler version to 1.4 2020-01-17 10:33:50 +03:00
Mikhail Glukhikh fbf1dbf2da FIR: introduce error message renderer 2019-12-10 12:58:38 +03:00
Mikhail Glukhikh fc117466a8 AbstractFirPsiCheckerTest: do partial error diagnostic comparison for some cases 2019-12-10 12:57:15 +03:00
Denis Zharkov 82537cdc8b Add recovery for missing comma between arguments
^KT-13497 Fixed
2019-01-17 14:58:01 +03:00
Mikhail Glukhikh ad44118605 Delay UNUSED_PARAMETER on main parameter until 1.4 (part of KT-26999) 2018-10-31 19:00:29 +03:00
Mikhail Glukhikh 387efc3791 Highlight unused parameters in main function in 1.3 (KT-26999) 2018-10-25 19:11:45 +03:00
Mikhail Zarechenskiy ee173077c0 Simplify diagnostic when there are wrong number of type arguments
#KT-12767 Fixed
2017-07-12 14:37:27 +03:00
Pavel V. Talanov bdf76f23c4 Jvm Codegen: do not throw on malformed delegation to a type parameter
Fix exception on light class building

See KT-15931
2017-06-06 17:11:19 +03:00
Dmitry Petrov a86fe89aae Include file name for package-level members in diagnostics 2017-05-26 13:58:46 +03:00
Mikhail Glukhikh 7a53b2f4c8 Introduce UNUSED_ANONYMOUS_PARAMETER for anonymous functions
It is not reported for 1.0 language version because
renaming to _ is not possible. It has weak warning severity

So #KT-8813 Fixed
So #KT-16875 Fixed
2017-04-04 14:23:30 +03:00
Dmitry Petrov b9f9894310 KT-15677 KT-15775
Update parser & descriptor renderer to handle parenthesized types and function types properly.
Resolve annotations in parenthesized types.

AnnotationsImpl.isEmpty() returned false for targeted annotations only
(e.g., 'fun @receiver:Ann C?.foo()').
Properly keep track of targeted annotations.
2017-01-19 09:53:17 +03:00
Dmitry Petrov 954204da82 KT-1560
Report warning on extensions shadowed by members.
2017-01-16 17:25:13 +03:00
Alexander Udalov eacf64e4db Report initializer block-related diagnostic on 'init' keyword 2016-11-22 18:19:01 +03:00
Ilya Gorbunov 8f3e6f38ed Select runtime with directive in test data file instead of test name in PsiChecker tests 2016-11-16 18:47:42 +03:00
Denis Zharkov 4c69416f2b Report warning on unused entities that can be renamed to _
Currently it's all about lambda parameters/destructuring entries

 #KT-14347 In Progress
2016-10-24 10:19:25 +03:00
Mikhail Glukhikh 8d48b0d2a0 UNUSED_VARIABLE is now reported only for last entry of destructuring declaration (if applicable) #KT-14221 Fixed 2016-10-10 14:42:09 +03:00
Mikhail Glukhikh e7d290f726 Refactor PSI for destructuring declarations in for: they are now children of KtParameter and not instead of it 2016-10-06 21:03:19 +03:00
Ilya Gorbunov 2a0076d9bd Test data: replace Exception with Throwable (in those tests where particular exception type is not crucial in order not to rename tests to have runtime dependency added with exception typealiases). 2016-08-17 12:40:50 +03:00
Pavel V. Talanov e51957a431 PsiChecker test for classes with dollars in name 2016-07-28 18:00:57 +03:00
Denis Zharkov b5bdb070a0 Fix test data after 4725dd3 2016-07-16 09:10:35 +03:00
Pavel V. Talanov 8fe14b7ba5 KT-11765 Analyze code in anonymous initializer of inteface
#KT-11765 Fixed
2016-04-05 15:04:07 +03:00
Pavel V. Talanov 3f62b6c495 Typecheck call arguments if callee is resolved to variable
#KT-11579 Fixed
2016-04-04 21:13:22 +03:00
Pavel V. Talanov 7de171efda Improve message clarity for WRONG_NUMBER_OF_TYPE_ARGUMENTS diagnostics
#KT-9887 Fixed
2016-03-31 16:06:48 +03:00
Valentin Kipyatkov f0ef04a6a8 Changed highlighting range for unresolved annotation name to not include '@'
#KT-11529 Fixed
2016-03-24 16:44:58 +03:00
Pavel V. Talanov 1affb05b7b Fix typechecker in case of "for ((a, b) in) { }"
Fixes NDFDE
2016-03-04 16:52:34 +03:00
Pavel V. Talanov 363d545bd5 Parameters of function types are always considered local 2016-03-04 16:52:33 +03:00
Pavel V. Talanov d72bc78550 Resolve annotations on parameters of function type 2016-01-20 18:06:23 +03:00
Pavel V. Talanov ce42d47383 Resolve lambda argument types when failing to resolve call 2016-01-19 14:14:33 +03:00
Pavel V. Talanov 9bfa90dc0e Analyze local variable declarations in expression position
Fixes exception on invalid code "val c = 1 < val Int.f: Int = 3"
2016-01-12 19:31:16 +03:00
Pavel V. Talanov 004c266433 Minor: fix missed error marker in test data 2015-12-29 18:13:10 +03:00
Pavel V. Talanov b38fc7b3c1 Parse local interfaces in expression position 2015-12-29 15:57:00 +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
Pavel V. Talanov 6a1ca7b9c9 Fix an exception caused by objects literals in supertype list not considered local 2015-12-23 14:56:27 +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 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
Denis Zharkov 17c906658d Transform Throwable members to properties 2015-10-14 20:39:59 +03:00
Denis Zharkov f0e3fd617d Adjust testData to CharSequence.length transformation 2015-10-14 20:39:35 +03:00
Denis Zharkov a76a8fcc3f Adjust various testData to remove/charAt transformation 2015-10-11 19:59:31 +03:00
Yan Zhulanow 1f2b4e20fe Replace get() and set() to getValue() and setValue() (property delegates) 2015-10-09 22:49:16 +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
Mikhail Glukhikh c24156ae84 "field": backing field usage deprecated warning, relevant diagnostics tests changed 2015-09-21 15:48:03 +03:00
Mikhail Glukhikh a1e3471d92 "field": deprecated warnings introduced, compiler tests migrated to the new syntax 2015-09-21 15:48:00 +03:00
Valentin Kipyatkov 7edff172a2 KT-1273 Unused assignment - should highlight assignment instead of expression
#KT-1273 Fixed
2015-05-19 23:45:59 +03:00
Valentin Kipyatkov 60b0236101 Corrected parser: incomplete code should never cause brace disbalance
Fixed KT-7539 fq name inserted when completing nested traits name

 #KT-7539
2015-05-16 17:15:12 +03:00
Mikhail Glukhikh 147bca3d22 Enum deprecated syntax detection implemented and integrated into DeclarationsChecker.
A lot of tests was changed to refactor deprecated syntax. Six new tests were added to check deprecated syntax detection.
Diagnostic for "enum entry uses deprecated super constructor": constructor is highlighted
Diagnostic for "enum entry uses deprecated or no delimiter".
One warning removed.
2015-05-15 16:13:34 +03:00
Dmitry Jemerov 625096466e IDE testdata: s/trait/interface 2015-05-13 16:13:13 +02:00
Dmitry Jemerov f374eec8f1 deprecating types after colon 2015-04-29 16:33:24 +02:00
Stanislav Erokhin 43e24f6b0d Fixed test data for new lambda syntax 2015-03-18 16:06:44 +03:00