Jinseong Jeon
2e660ef62a
Raw FIR: use lambda parameter type if available
2021-01-21 16:06:23 +03:00
Jinseong Jeon
fa0b933bc8
FIR checker: add diagnostics for missing/ambiguous component calls
2021-01-21 16:06:10 +03:00
Ilmir Usmanov
d1ee45b518
Add language feature for suspend functions in fun interfaces
...
Since in 1.5 JVM_IR is enabled by default and supports suspend functions
in fun interfaces, it is safe to enable the feature by default as well.
2021-01-19 16:03:31 +01:00
Mikhail Glukhikh
6cee4e968e
[FIR] Don't call componentX for anonymous destructuring entry
2021-01-18 08:28:15 +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
Denis Zharkov
f97cc0b62d
FIR: Rework receivers processing in resolution
...
- Put extensionReceiver to candidate even if it's explicit (for sake of clarity)
- Split CheckReceiver (dispatch part should only check nullability)
2020-11-16 15:50:39 +03:00
Mikhail Glukhikh
4605a65f41
[FIR] Good test data fixes (around captured types)
2020-09-14 17:56:39 +03:00
Nick
889324e972
[FIR] Ignore failing test, improve DiagnosticKind, fix UPPER_BOUND
2020-08-02 18:19:45 +03:00
Mikhail Glukhikh
0804c6a0f3
[FIR] Introduce TYPE_ARGUMENTS_NOT_ALLOWED & some other type errors
...
This commit introduces several different things, in particular:
- check type arguments in expressions
- new TypeArgumentList node to deal with diagnostic source
- ConeDiagnostic was moved to fir:cones
- ConeIntermediateDiagnostic to use in inference (?) without reporting
- detailed diagnostics on error type
2020-08-02 18:19:44 +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
Victor Petukhov
eff5f3a242
NI: do type checking for anonymous functions not inside a call
...
^KT-38890 Fixed
^KT-38439 Fixed
2020-05-19 16:29:14 +03:00
Denis Zharkov
fa3b3e7a9a
FIR: Fix false positive INAPPLICABLE_INFIX_MODIFIER
2020-04-21 09:48:03 +03:00
simon.ogorodnik
f573719cc1
[FIR] Fix missing receiver type if anonymous function without label
2020-04-08 14:56:17 +03:00
Mikhail Glukhikh
c1b9fdd2f3
Fix diagnostic test data to be consistent with FIR test data
2020-03-27 16:46:59 +03:00
Dmitriy Novozhilov
a1d81aa15f
[FIR-TEST] Fix diff between FIR and old FE testdata
2020-03-27 16:39:02 +03:00
Dmitriy Novozhilov
48fb279721
[FIR] Add constraint to flexible type for declared argument for java parameter
2020-03-27 10:17:12 +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
Mikhail Glukhikh
64c7ab1302
[FIR] Fix lambda resolve in independent context
2020-02-04 15:00:12 +03:00
Victor Petukhov
437a26684d
NI: Prefer nullable lower bound to flexible one when substitution of type variable is performed and remember flexibility of type parameters based on flexibility of its upper bounds
...
^KT-32435 Fixed
2020-01-17 19:16:09 +03:00
Dmitriy Novozhilov
2536fa0cd5
[FIR-TEST] Add new testdata generated after changes in previous commit
2019-12-12 16:11:46 +03:00
victor.petukhov
e246c23a46
Fix prematurely analyzing a lambda while fixing a type variable for another argument
...
^KT-35168 Fixed
2019-11-28 19:03:30 +03:00
Mikhail Zarechenskiy
455b9f852d
[NI] Disable caching of LHS expression types for "+=" operators
...
New behavior was introduced in ab506c1579 which breaks compilation on IDE module (see test example) for new inference.
Now we temporarily disable this optimisation. This is temporarily restriction which will be fixed once we'll have the same rules for lambdas completion
#KT-34889 Open
2019-11-13 15:07:39 +03:00
Mikhail Zarechenskiy
60a0cf1fcc
[NI] Fix exception: don't try to compute type depth on null type
...
#KT-32184 Fixed
2019-06-25 14:09:42 +03:00
Mikhail Zarechenskiy
787a8bb9bd
Revert "[NI] Disable capturing/approximation type in TypeSubstitutor with enabled NI"
...
This reverts commit 7c4101e21c .
#KT-31866 Fixed
#KT-31868 Fixed
#EA-125401 Fixed
#KT-25290 Open
2019-06-07 12:31:38 +03:00
Dmitriy Novozhilov
7c4101e21c
[NI] Disable capturing/approximation type in TypeSubstitutor with enabled NI
2019-05-29 10:35:46 +03:00
Mikhail Zarechenskiy
848640253a
Revert "[NI] Disable capturing/approximation type in TypeSubstitutor with enabled NI"
...
This reverts commit f20ec3e0a6 .
2019-05-29 01:31:28 +03:00
Dmitriy Novozhilov
f20ec3e0a6
[NI] Disable capturing/approximation type in TypeSubstitutor with enabled NI
...
There is added a new service named `SubstitutingScopeProvider`, that
provides factory that creates captured types and approximator for them.
In OI they are the same as before commit, for NI they are empty, because
that approximation interferes with NI algorithm
That service is injected into function descriptors and property descriptors
and used for creating `SubstitutingScope` with correct services
Also there is changed time when we approximate captured types in NI
(after all call checkers)
#KT-25290 Fixed
2019-05-28 11:18:33 +03:00
Dmitriy Novozhilov
e46f552a8d
[NI] Update testdata in diagnostic tests
2019-05-06 11:36:20 +03:00
Dmitriy Novozhilov
251a02f71d
[NI] Fix recording type of lambda in trace
2019-05-06 11:36:08 +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
Mikhail Zarechenskiy
2fe900d915
[NI] Resolve lambda against input types from expected type
...
This is needed to report more precise diagnostics and fix IDE-tests
#KT-31059 Fixed
2019-04-19 09:08:31 +03:00
Mikhail Zarechenskiy
bcc8802014
[NI] Avoid constraints from expected type for effectively empty system
...
Expression will be checked against expected type later.
Theoretically, this is not very good, but it aligns with the old
inference, plus it helps avoiding multiple type mismatch diagnostics.
2019-04-17 12:55:12 +03:00
Dmitriy Novozhilov
9825984bc5
[NI] Update test data for diagnostic tests
2019-03-25 12:17:27 +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
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
Mikhail Zarechenskiy
9891f562cc
[NI] Make subtyping algorithm more robust to error types
...
During subtyping/incorporation we transform types (e.g. changing nullability,
form of the type) and, basically, we're doing this to some FIXPOINT.
It's important that we use `KotlinType.hashCode()` to compare types, but
for error types hashCode is a hashCode of its supertype and, for example,
`makeNullableAsSpecified` method recreate type every time. So, we continue
to generate new constraints and we'll never stop incorporation algorithm
2018-06-07 15:45:53 +03:00
Stanislav Erokhin
18b65e7bcf
[NI] Update test data
2018-06-04 12:21:47 +03:00
Mikhail Zarechenskiy
d818af5287
[NI] Don't forget to analyze whole block for last postponed expression
2017-12-19 15:11:03 +03:00
Dmitry Savvinov
ea72c76a37
[NI] Testdata changes after fixes in error types
2017-12-07 12:49:56 +03:00
Mikhail Zarechenskiy
328c67b9e8
Add separate diagnostic renderer results for tests with NI
2017-11-29 02:54:30 +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
baratynskiy
01883a41cb
javac-wrapper: refactoring, fixes and tests
2017-08-29 18:01:36 +03:00
Mikhail Zarechenskiy
f5cd8c7e4d
Relax name shadowing warning on parameter names
...
#KT-17611 Fixed
2017-07-07 14:19:57 +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
Derek Alexander
1f5cc059f9
Fix compiler failure related NO_EXPECTED_TYPE
...
Changes to turn KT-16016 into a compiler diagnostic error rather than a
stack trace
#KT-16016 Fixed
2017-06-16 15:52:09 +03:00
Mikhail Zarechenskiy
7541a3754d
Move SAM constructors to synthetic scope
2017-05-05 21:30:35 +03:00