Commit Graph

53 Commits

Author SHA1 Message Date
Nikolay Lunyak 425d5e808b [FIR] Link some tests with issues
Just in case.

^KT-59874
2023-11-14 15:19:33 +00:00
Dmitrii Gridin 3debf36d60 [FIR] DFA: add missing unwrap for FirDesugaredAssignmentValueReferenceExpression
^KT-60319 Fixed
^KT-61407 Fixed
2023-08-23 09:15:25 +00:00
Denis.Zharkov eae673233b FIR: Rework FirRegularTowerDataContexts
- Get rid of SPECIAL mode (just left REGULAR and class-related instead)
- Clear naming
- Restore contexts after lambda/callable reference are processed

The test has been failing before this change because after
callable reference is resolved, its tower data context has been left
erroneously in the SPECIAL-related entry
2022-06-06 09:39:29 +00:00
Denis.Zharkov a0a57581ec FIR: Do not add alias for variables with explicit type 2021-10-20 22:05:24 +03:00
Jinseong Jeon e2dc21da90 FIR checker: warn useless as and is 2021-05-05 18:20:51 +03:00
Ivan Kochurkin ad9b962536 [FIR] Fix tests (ARGUMENT_TYPE_MISMATCH instead of INCOMPATIBLE_CANDIDATE) 2021-04-12 23:49:55 +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 8dd9d98129 [FIR] Implement checker for exhaustive when's in expression position 2021-02-09 16:04:40 +03:00
Mikhail Glukhikh 7d4eaefd36 FIR: report UNSAFE_CALL on dot when possible 2021-01-29 16:55:26 +03:00
Jinseong Jeon e72ddbcbfe FIR checker: differentiate UNSAFE_CALL from INAPPLICABLE_CANDIDATE
To do so, inside the root cause of inapplicable candidate errors,
we will record expected/actual type of receiver, if any.
That will help identifying inapplicable calls on nullable receiver.
2021-01-29 16:54:23 +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
Dmitriy Novozhilov f283f2db43 [FIR] Improve diagnostic reporting & don't use error symbol for candidate if possible
Also introduce few new diagnostics:
- NONE_APPLICABLE more many inapplicable candidates
- HIDDEN for visible candidates
2020-07-28 20:46:56 +03:00
Dmitriy Novozhilov 3190793b62 [FIR] Add incoming edges to local class's property initializers 2020-04-03 10:08:19 +03:00
Denis Zharkov d869ae7826 FIR: Make resolution logic for local classes the same as for top-level
Run different phases through common transformers sequentially
It should make code more reusable and may help with avoid common bugs
2020-03-25 15:36:17 +03:00
Dmitriy Novozhilov 5f639dd2ae [FIR-TEST] Update testdata of old frontend tests 2020-01-22 14:49:22 +03:00
Dmitriy Novozhilov 2536fa0cd5 [FIR-TEST] Add new testdata generated after changes in previous commit 2019-12-12 16:11:46 +03:00
Mikhail Zarechenskiy 9847278699 Report error about invalid if as expression on the if keyword
#KT-14633 Fixed
2017-06-22 14:18:11 +03:00
Yan Zhulanow e14c9645dc Error on 'if' without an 'else' branch when used as an expression 2015-10-19 03:56:15 +03:00
Alexander Udalov ec1b4776fe Deprecate PropertyMetadata, use KProperty<*> for delegated properties instead 2015-10-14 20:45:25 +03:00
Denis Zharkov f0e3fd617d Adjust testData to CharSequence.length transformation 2015-10-14 20:39:35 +03:00
Yan Zhulanow dc8e796e49 getValue()/setValue() should be marked with 'operator' 2015-10-14 01:29:09 +03:00
Yan Zhulanow 1f2b4e20fe Replace get() and set() to getValue() and setValue() (property delegates) 2015-10-09 22:49:16 +03:00
Michael Nedzelsky bc5c9065d2 fix tests in org.jetbrains.kotlin.checkers 2015-09-08 02:04:32 +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
Dmitry Jemerov f374eec8f1 deprecating types after colon 2015-04-29 16:33:24 +02:00
Denis Zharkov f07566d30d Add warning for initializers with obsolete syntax
Expected 'init' keyword before class initializer
2015-03-11 17:45:26 +03:00
Evgeny Gerashchenko 056daeaadb Don't mark parameters of get/set/propertyDelegated functions as unused.
#KT-5974 fixed
2015-03-05 18:42:16 +03:00
Andrey Breslav 54483dbb95 KT-6118 Redundant type cast can be not redundant?
#KT-6118 Fixed
2015-02-16 18:50:10 +03:00
Evgeny Gerashchenko 897854b3dc KT-6671 Report unused constructor parameters
#KT-6671 fixed
2015-01-27 22:38:27 +03:00
Alexander Udalov f3b2193afd Delete traces of "jet" in test data and unimportant code 2015-01-13 15:02:16 +03:00
Evgeny Gerashchenko a3fdce8131 Highlighting "as Foo" for useless casts in gray.
#KT-6070 fixed
2014-12-08 17:30:47 +03:00
Alexander Udalov a7b88e9485 Make CharSequence.length a function instead of property
And String.length as well.

This is done for JVM interoperability: java.lang.CharSequence is an open class
and has a function 'length()' which should be implemented in subclasses
somehow.

A minor unexpected effect of this is that String.length() is now a compile-time
constant (it wasn't such as a property because properties are not supported in
compile-time constant evaluation)

 #KT-3571 Fixed
2014-11-27 20:38:17 +03: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 a47729c626 KT-5455 Need warning about redundant type cast
#KT-5455 Fixed
2014-10-18 11:06:52 +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
Alexey Sedunov 9cbcabffa4 Control-Flow Analysis: Reuse pseudo-value information for unused expression analysis 2014-07-28 13:07:37 +04:00
Zalim Bashorov c767ffc3e7 Unit.VALUE -> Unit in testData 2014-07-25 17:16:40 +04:00
Svetlana Isakova c30259dfbe added info about smart casts to diagnostic tests 2013-12-11 19:53:50 +04:00
Alexander Udalov 4cd4026174 Support empty if-statements
Type-check "if (...) ;" to Unit, report "implicit cast to Unit", propagate data
flow info out of its condition

 #KT-2478 Fixed
2013-12-04 15:19:47 +04:00
Andrey Breslav 3d28c4cdb2 Passing DataFlowInfo to local classes/objects
#KT-2835 In Progress
#KT-2225 In Progress
#KT-338 In Progress
2013-08-19 19:05:21 +04:00
Andrey Breslav 4908766813 Passing DataFlowInfo when analyzing property initializers
#KT-2835 In Progress
#KT-2225 In Progress
#KT-338 In Progress
2013-08-19 19:05:21 +04:00
Andrey Breslav 63c284e200 Passing DataFlowInfo to local classes/objects
#KT-2835 In Progress
#KT-2225 In Progress
#KT-338 In Progress
2013-08-19 19:05:20 +04:00
Andrey Breslav 5eaa5b396b Removing usages of tuples from test data
(KT-2358 Drop tuples)
 #KT-2358 In progress
2012-09-18 20:27:09 +04:00