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
2bb5740f47
[FIR] Resolve ambiguities in Java static scopes
2020-01-30 16:28:08 +03:00
Mikhail Zarechenskiy
e42f16c95c
[NI] Fix construction of common system for builder inference
2020-01-29 11:43:15 +03:00
Dmitriy Novozhilov
7d8363d6aa
[FIR] Use Function<R> as super type for all FunctionNtypes
2020-01-28 14:14:20 +03:00
Mikhail Glukhikh
f949b48b4a
[FIR] Swap priority of kotlin libraries / built-ins #KT-35948 Fixed
2020-01-27 13:21:54 +03:00
Mikhail Glukhikh
14204a842a
Refactoring & clarification: implement new FIR tower resolver
2020-01-27 00:34:16 +03:00
Ilya Gorbunov
b1766b167f
Remove mod function usage from tests
...
#KT-26654
2020-01-23 19:28:23 +03:00
Pavel Kirpichenkov
c5893913f3
[NI] Remove lambda coersion to Unit in case of error return type(s)
...
Coersion to Unit from error type leads to misleading type mismatches:
"expected <expected lambda return type> found Unit", despite no user-provided Unit / empty lambda.
These diagnostics were collected, but not reported before, and that had been disguising the issue for a while.
KT-34729 Fixed
2020-01-23 13:18:50 +03:00
Abduqodiri Qurbonzoda
1203df7405
Deprecate floating point to integral types lesser than Int #KT-30360
2020-01-22 23:27:35 +03:00
Dmitriy Novozhilov
d7c85406fb
[FIR-TEST] Mute some failing tests according to changes in DFA
2020-01-22 14:49:22 +03:00
Dmitriy Novozhilov
5f639dd2ae
[FIR-TEST] Update testdata of old frontend tests
2020-01-22 14:49:22 +03:00
Dmitriy Novozhilov
76b3964e96
Update testdata according to change compiler version to 1.4
2020-01-17 10:33:50 +03:00
Mikhail Zarechenskiy
4f74515508
[NI] Fix CST calculation for covariant type projections
2020-01-16 17:18:20 +03:00
Ilya Gorbunov
9566f329f0
Mute FIR test failures and adjust failing test data due to KT-35948
2020-01-16 15:36:19 +03:00
Ilya Gorbunov
ac790bea71
Reorganize diagnostics tests with stdlib and reflect
...
DiagnosticsTestWithStdLib now require stdlib only.
Move test data accordingly.
The only test that required kotlin-reflect is transformed into
codegen box test.
2020-01-16 15:35:58 +03:00
Denis Zharkov
676c99b933
NI: Fix exception during callable references overload resolution
...
^KT-35847 Fixed
2020-01-16 10:49:49 +03:00
Dmitriy Novozhilov
7733611c47
[TEST] Replace Experimental with OptIn in testdata
2020-01-15 22:12:28 +03:00
Dmitriy Novozhilov
3428a17759
[NI] Postpone calls with not enough information in builder inference
2020-01-15 14:01:25 +03:00
Alexander Udalov
f954a6c812
Support custom message in RequiresOptIn
...
#KT-34648 Fixed
2020-01-14 21:04:43 +01:00
Alexander Udalov
7742a3b697
Rename UseExperimental->OptIn, Experimental->RequiresOptIn in compiler tests
2020-01-14 21:04:42 +01:00
Mikhail Glukhikh
5c6341b4e4
[FIR] Handle fully qualified expressions separately in tower resolver
2020-01-13 13:26:13 +03:00
Pavel Kirpichenkov
2a4e235e34
[NI] Decrease only input types check diagnostic level to warning
2020-01-10 13:05:40 +03:00
simon.ogorodnik
5e426fdc71
[FIR] Optimization & checking fix: remove usage of dispatchReceiverValue
2019-12-27 13:45:59 +03:00
Dmitriy Novozhilov
5dfe100ae5
Allow use reference to reified type parameters in contracts since 1.4
2019-12-26 17:43:28 +03:00
Dmitriy Novozhilov
9c1b68f839
Prohibit using references to this from outer scope in contract declarations
2019-12-26 17:43:28 +03:00
Dmitriy Novozhilov
f083edfac2
Allow contracts on final non-override members since 1.4
2019-12-26 17:43:27 +03:00
Mikhail Zarechenskiy
8871c8b4fd
Migrate diagnostic tests to 1.4
2019-12-26 15:08:51 +03:00
Dmitriy Novozhilov
e83941a98e
[NI] Don't resolve delegates twice
...
#KT-31219 Fixed
#KT-31679 Fixed
#KT-32249 Fixed
2019-12-26 10:54:06 +03:00
Pavel Kirpichenkov
7ee71450bc
[NI] Discriminate Nothing? result type from nullability constraints
...
Nullability constraints should not be chosen when proper
argument constraints for variables in contravariant position present.
^KT-32106 Fixed
^KT-33166 Fixed
2019-12-25 14:59:06 +03:00
Mikhail Zarechenskiy
3840294f44
Add tests for obsolete issues
...
#KT-11979 Obsolete
#KT-12898 Obsolete
#KT-30657 Obsolete
#KT-28446 Obsolete
2019-12-20 12:06:20 +03:00
Dmitriy Novozhilov
e730965bc5
[NI] Approximate intersection type in type argument to star if it's necessary
...
#KT-32196 Fixed
2019-12-20 11:33:06 +03:00
Dmitriy Novozhilov
7fed7a840b
[NI] Update some testdata broken in NI
2019-12-20 11:17:47 +03:00
Victor Petukhov
c89def9e06
[minor] Update test data for 1.4
2019-12-19 19:31:32 +03:00
Mikhail Glukhikh
99643e1b2d
FIR: do not run full tower resolve on integer literal type
2019-12-19 16:03:17 +03:00
Dmitriy Novozhilov
aa8578b675
Allow null operators for result and using Result as return type with enabled InlineClasses
2019-12-19 10:22:45 +03:00
Pavel Kirpichenkov
ebb9f09656
[NI] Fix issues with star projection uncapturing
...
Prevent stack overflow during uncapturing of star projection
for parameter with recursive upper bound.
Uncapture star projections for flexible type parameters with
respect to flexible upper bound.
^KT-35210 Fixed
2019-12-18 16:19:33 +03:00
Pavel Kirpichenkov
86dc0925b1
[NI] Preserve constraint position for OnlyInputType during incorporation
...
Variable with complex dependency on other variable loses its
original constraint position when variable it depends on is fixed.
To prevent that, original input position is saved in incorporation
position.
2019-12-18 16:19:33 +03:00
Pavel Kirpichenkov
2fc79856a2
[NI] Fix OnlyInputTypes for captured types
...
Uncapture projections recursively for cases when captured type is not
top-level type or first level type argument
2019-12-18 16:19:32 +03:00
Mikhail Glukhikh
684bdc44bb
FIR: add implementation of reified type parameter references
...
This adds support of T::class.java for reified type parameters
2019-12-17 17:28:01 +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
afd59f0d46
[NI] Fix 'only input type' check for intersection types
...
Check worked incorrectly in case when argument type and expected type are the
same intersection type, which is possible for local variables without explicit
type declaration.
2019-11-21 15:59:26 +03:00
Pavel Kirpichenkov
8c52bb4212
Add frontend checks for missing dependency supertypes
...
Call checker and declaration checker are used in order to preserve backward compatibility.
Attempt to use classifier usage checker was not good enouth,
since not all errors found with it would actually be reported before.
For example types and constructor calls don't cause supertypes to resolve,
so missing supertypes would not lead to errors in case they are the only use of class name.
Updated tests failing due to missing Java dependencies in superclasses.
2019-11-18 12:06:41 +03:00
Ilya Chernikov
27ff2d7816
Prohibit using array based on non-reified type parameters as reified type arguments
...
#KT-31227 fixed
2019-11-18 09:32:52 +01:00
Pavel Kirpichenkov
ff32eab3d1
[NI] Run call checkers on resolved calls for callable references
...
#KT-34391 Fixed
2019-11-08 11:04:43 +03:00
Dmitriy Novozhilov
61c337588b
Revert testdata accidentally committed in 665405c4
2019-11-07 10:41:15 +03:00
Mikhail Zarechenskiy
5582fd4056
[NI] Discard DefNotNull types inside invariant positions
...
#KT-30297 Fixed
#KT-32168 Fixed
#KT-27722 Fixed (actually, it was fixed with addition of DefNotNullTypes, and now test was added to save this behavior)
#KT-32345 Fixed
2019-11-06 15:20:17 +03:00
Dmitriy Novozhilov
665405c435
[FIR] Add discriminating generics into ConeOverloadConflictResolver
2019-11-06 15:05:06 +03:00
victor.petukhov
62d204f4d6
Support trailing comma
...
^KT-34743 Fixed
2019-11-01 19:40:20 +03:00
Pavel Kirpichenkov
87b88a738e
[Minor] Update test data for NI
2019-10-25 19:37:06 +03:00
Pavel Kirpichenkov
d886d48cf0
Record resolution results for ambiguous callable references
...
#KT-34282 Fixed
2019-10-23 18:52:53 +03:00