Mikhail Zarechenskiy
b10d19dc78
[NI] Align builder inference with the old inference
...
#KT-29184 Fixed
2019-03-29 12:32:00 +03:00
Mikhail Zarechenskiy
1eb70ea19e
[NI] Update test data related to builder-inference
2019-03-29 12:32:00 +03:00
Mikhail Zarechenskiy
b033b9180b
[NI] Avoid builder-inference algorithm if types specified explicitly
...
#KT-30620 Fixed
2019-03-29 12:31:59 +03:00
Dmitriy Novozhilov
1ac3542036
[NI] Decrease priority of Integer Literal Types in type checking
...
#KT-30446
2019-03-29 11:55:30 +03:00
Mikhail Zarechenskiy
a50cc99b01
[NI] Discriminate integer literal types as they are less specific
...
Plus simplify code in `ResultTypeResolver` a bit
2019-03-26 22:32:14 +03:00
Victor Petukhov
568506e5c1
Exclude warning "Remove final upper bound" for functions with override modifier
...
^KT-25105 Fixed
2019-03-25 22:14:26 +03:00
Dmitriy Novozhilov
ca0e66bafc
[NI] Refactor compiler representation of integer literals types
...
Add `IntegerLiteralTypeConstructor` that holds types, that can take
integer literal with given value. It has two supertypes
(`Number` and `Comparable<IntegerLiteralType>`) and have
special rules for subtyping, `intersect` and `commonSuperType`
functions with primitive number:
Example (assuming that ILT holds Int type):
* ILT <: Int
* Int :> ILT
* ILT intersect Int = Int
* commonSuperType(ILT, Int) = Int
#KT-30293 Fixed
#KT-30446 Fixed
2019-03-25 18:55:36 +03:00
Dmitriy Novozhilov
d3e98bc434
[NI] Update test data for diagnostic tests
2019-03-25 12:38:37 +03:00
Mikhail Zarechenskiy
3eda7c462b
[NI] Add Nothing constraint if it was inferred from a call
2019-03-25 12:17:28 +03:00
Mikhail Zarechenskiy
ca894a6a71
[NI] Don't complete nested call if there's no constraints at all
2019-03-25 12:17:28 +03:00
Dmitriy Novozhilov
9825984bc5
[NI] Update test data for diagnostic tests
2019-03-25 12:17:27 +03:00
Dmitriy Novozhilov
58189c79ca
Add regression test for PROTECTED_CONSTRUCTOR_NOT_IN_SUPER_CALL diagnostic
...
#KT-20507
2019-03-21 16:09:46 +03:00
Dmitriy Novozhilov
d01b6ef900
Revert "[NI] Support @OnlyInputTypes annotation. #KT-29307 fixed"
...
This reverts commit 90628112
With that annotation there is complex bug that breaks build of Kotlin compiler
2019-03-18 18:53:38 +03:00
victor.petukhov
9a2178d96b
Split 'nothingTypedSuspendFunction' test into two separate tests (for old and new coroutines)
2019-03-16 21:39:44 +03:00
victor.petukhov
29493a4977
Fix 'nothingTypedSuspendFunction' test after 70c35f4186
2019-03-16 14:15:08 +03:00
victor.petukhov
70c35f4186
Introduce warning about implicitly inferred Nothing as a type parameter
...
^KT-20849 Fixed
2019-03-15 19:28:38 +03:00
Dmitriy Novozhilov
b07aed7a00
[NI] Fix determination of completion mode. #KT-30406 Fixed
2019-03-15 10:39:50 +03:00
Dmitriy Novozhilov
1c92c22dee
[NI] Add support ExpectedTypeFromCast to new inference. #KT-30405 Fixed
2019-03-15 10:39:29 +03:00
Dmitriy Novozhilov
9062811231
[NI] Support @OnlyInputTypes annotation. #KT-29307 fixed
...
Also KT-26698 fixed in new inference
2019-03-15 10:39:11 +03:00
Dmitriy Novozhilov
0ba163d70b
[NI] Fix testdata of inference lambdas with SAM conversions
...
Tetdata was broken in 3e147af3c0
#KT-27565 related
2019-03-15 10:39:11 +03:00
Alexander Udalov
f9be21c935
Report warning on @Synchronized on inline methods
...
Until KT-27310 is supported, we warn users that this has no effect.
#KT-29884 Fixed
2019-03-11 18:32:44 +01:00
Dmitriy Novozhilov
cbf1d773f7
NI. Coerce return type of lambda function descriptor to Unit. #KT-30242 Fixed
2019-03-07 14:36:09 +03:00
Dmitriy Novozhilov
77c98bef4d
Fix recursion in contract declaration analysis. KT-26386 Fixed
...
Issue fixed only in old inference
2019-03-07 14:35:18 +03:00
Alexander Udalov
59fda8d7ce
Support JvmPackageName with JvmMultifileClass
...
This is an internal feature of our standard library needed to compile
new API for unsigned types
2019-03-06 15:34:23 +01:00
Alexander Udalov
d1e33534db
Implement typeOf intrinsic on JVM
...
#KT-29915 Fixed
2019-03-05 18:16:31 +01:00
Mikhail Zarechenskiy
c4b69b65bc
Gradually prohibit comparison of incompatible enums
...
#KT-22043 Fixed
2019-03-05 13:33:23 +03:00
Mikhail Zarechenskiy
7c357c0ec0
[NI] Complete calls during one inference session only once
...
The problem is that delegated properties resolve two calls together:
`getValue`/`setValue` with a common receiver, which can contain
callable references. For each completion new anonymous descriptor
was created and caused "rewrite at slice" exceptions later.
Now there is a little hack to check that during one inference session
we don't complete one call more than one time.
More correct fix would be to explicitly specify common receiver for
inference session but it requires quite big refactoring, which will
be done later with a whole refactoring of the common solver
#KT-30250 Fixed
2019-03-05 13:33:22 +03:00
Mikhail Zarechenskiy
93e79afab4
[NI] Preserve nullability of resulting type from CST if it's possible
...
Consider common supertype of `S` and `Nothing`, where `S` has nullable
upper bound or it's flexible. Before the fix, result was `S?`, which
is correct but too conservative. Now, we'll preserve nullability of
resulting type if it's already nullable.
This happened because we were failing to find path of not-nullable
types from `Nothing` to `S`, which should obviously exists by
semantics of Nothing
2019-03-04 11:29:39 +03:00
Mikhail Zarechenskiy
9b3e17f0d7
[NI] Avoid building controversial systems by clipping extra constraints
...
#KT-23854 Fixed
2019-03-04 11:29:38 +03:00
Mikhail Zarechenskiy
43cf6623f9
[NI] Added test for controversial common system
...
See KT-23854
2019-03-04 11:29:38 +03:00
Dmitriy Novozhilov
2f5843f764
Move detecting of illegal call of contract function into call checker
...
(#KT-26153, #KT-26191) fixed
2019-03-01 14:50:46 +03:00
Dmitriy Novozhilov
4a7420d77d
Allow declaring contracts on suspend functions. KT-27468 Fixed
2019-03-01 14:50:46 +03:00
Dmitriy Novozhilov
84da8b6279
Report CONTRACT_NOT_ALLOWED diagnostic on extension property getter/setter
...
KT-27090
2019-03-01 14:50:46 +03:00
Dmitriy Novozhilov
b484e03fa8
Allow use contract function by FQN. #KT-29772 fixed
2019-03-01 14:50:46 +03:00
Dmitriy Novozhilov
7072b9d179
Fix order of fixing type variables for callable references. KT-25433 Fixed
2019-03-01 14:50:33 +03:00
Alexander Udalov
736ac12374
Prohibit type parameters in class literals in annotation arguments
...
#KT-27799 Fixed
2019-02-26 19:09:42 +01:00
Dmitriy Novozhilov
677987c85f
Add diagnostics on annotations on super types. KT-23992 fixed
2019-02-22 10:28:21 +03:00
Dmitriy Novozhilov
1fc6f30c50
Add test for KT-23992
2019-02-22 10:22:19 +03:00
Dmitriy Novozhilov
92bd907983
Fix checking repeatablilty of use-site target annotations. KT-26638 fixed
2019-02-22 10:15:37 +03:00
Dmitriy Novozhilov
cfda468f13
Add test for KT-26638
2019-02-22 10:15:37 +03:00
Dmitriy Novozhilov
3e147af3c0
KT-27565 fix
2019-02-22 10:15:16 +03:00
Dmitriy Novozhilov
cd2b8839b4
Add test for KT-27565
2019-02-22 10:15:16 +03:00
Dmitriy Novozhilov
d58ee133a2
Fix type constraints of empty lambda (KT-28654 fix)
2019-02-21 12:04:23 +03:00
Dmitriy Novozhilov
2ba33c3b8a
Fix testdata broken in 46bd5ba
2019-02-21 12:04:23 +03:00
Dmitriy Novozhilov
10b7baf69a
Add test for KT-28654
2019-02-21 12:04:23 +03:00
Dmitriy Novozhilov
f186c83b15
KT-25383 fix
2019-02-21 12:04:23 +03:00
Yaroslav Russkih
028a311949
Use https everywhere - tests and test data
2019-02-19 21:35:36 +01:00
Dmitriy Novozhilov
d1b7c0f683
Fix testdata for try/catch inference and DFA
2019-02-18 12:43:42 +03:00
Dmitriy Novozhilov
a4d6f72ad1
Split testdata of #KT-25432 and #KT-29767
2019-02-17 13:03:01 +03:00
Dmitriy Novozhilov
49a42f9434
Fix #KT-28999. Prohibit type parameters on anonymous objects
2019-02-17 13:02:22 +03:00