Commit Graph

15 Commits

Author SHA1 Message Date
Alejandro Serrano Mena f227447837 [K2] Disallow named functions as expressions
^KT-62573 Fixed
^KT-59945 Fixed
2023-10-25 13:24:30 +00:00
Denis.Zharkov ddbdfafa79 Remove OI/NI attributes from test data 2021-05-25 13:28:27 +03:00
Denis.Zharkov 2ecba6ac39 Remove WITH_NEW_INFERENCE directive from all tests
This directive anyway does not make test run twice with OI, and with NI
It only once run the test with specific settings (// LANGUAGE)
and ignores irrelevant (OI or NI tags)
2021-05-25 13:28:26 +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 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
Mikhail Zarechenskiy 4542f3b720 [NI] Finish analysis for coerced last lambda expressions if needed 2020-02-17 10:29:45 +03:00
Dmitriy Novozhilov f186c83b15 KT-25383 fix 2019-02-21 12:04:23 +03:00
victor.petukhov 30762a450a Wrap diagnostic parameters to double quotes and split by comma instead of semicolon 2019-02-14 12:31:42 +03:00
Mikhail Zarechenskiy 2be08f4d60 [NI] Fix exception, recorded type for function statement can be null
See `checkStatementType`, we return `null` to reduce count of errors.

 Also, note that named function which is used as last statement in lambda
 doesn't coerce to Unit, this is a separate bug and will be addressed later,
 see #KT-25383

 #EA-121026 Fixed
2018-07-10 17:41:17 +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 9847278699 Report error about invalid if as expression on the if keyword
#KT-14633 Fixed
2017-06-22 14:18:11 +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
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 16736e3a0e Resolve anonymous functions in block as expression
#KT-7265 Fixed
2016-03-23 20:08:15 +03:00