Ilmir Usmanov
69be56d042
Value classes: Forbid cloneable value classes
...
#KT-43741 Fixed
2020-12-04 23:27:46 +01:00
Jinseong Jeon
5167d69b7c
FIR checker: introduce member property checker
2020-12-04 16:58:30 +03:00
Ilmir Usmanov
f43899086a
Value Classes: Forbid var properties with value class receivers
2020-12-04 09:45:56 +01:00
Ilmir Usmanov
0d55c9108d
IC: Forbid inner classes inside inline classes
...
#KT-43067 Fixed
2020-12-04 05:45:53 +01:00
Ilmir Usmanov
15c325cf10
Value classes: Allow nested inline classes
2020-12-04 05:45:51 +01:00
Mikhail Glukhikh
4626f21c58
Record type arguments for FirResolvedQualifier
2020-12-03 19:33:51 +03:00
Ilmir Usmanov
516fce37db
Value classes: Allow unsigned arrays in annotations
...
including varargs, apparently.
So, we allow unsigned types and unsigned arrays in annotations,
but disallow user-defined inline classes.
#KT-23816 Fixed
2020-12-03 17:22:08 +01:00
Victor Petukhov
d25ad269e0
Reuse captured arguments for flexible type's bounds properly, by equality of type constructors modulo mutability and type argument
...
^KT-43630 Fixed
2020-12-03 11:13:41 +03:00
Mikhail Glukhikh
2429f429c5
[FIR] Set isStubTypeEqualsToAnything = true for inference as in FE 1.0
...
#KT-43616 Fixed
2020-12-02 14:49:08 +03:00
Ilmir Usmanov
129de76288
Value classes: Generate @JvmInline annotation for inline classes
...
but not for value classes.
Since inline classes and value classes share the same flag, we use
presence of the annotation to distinguish them.
2020-12-01 23:45:47 +01:00
Dmitry Petrov
3b604cfa7f
JVM_IR KT-32701 generate multiple big arity invokes, report error later
2020-11-30 15:49:02 +03:00
Mikhail Glukhikh
9b30655d66
[FIR] Load Java annotations named arguments properly (see KT-43584)
2020-11-30 13:05:23 +03:00
Ilmir Usmanov
78e607c6b0
Value classes: Support @JvmName annotation on functions with inline
...
classes in signatures, but not on methods of inline classes.
2020-11-28 00:34:04 +01:00
Ilmir Usmanov
05c4dfef3d
Value classes: Use 'value' keyword instead of 'inline' in stub dumps
2020-11-27 23:52:08 +01:00
Ilmir Usmanov
ca3e7cf1a7
Value classes: Report lacking @JvmInline only on JVM backend
...
Report when @JvmInline is applied on non-value class.
2020-11-27 23:52:07 +01:00
Ilmir Usmanov
92f1681de0
Value classes: treat @JvmInline value classes as inline classes
...
Report error on value classes without @JvmInline annotation.
Do not check for @JvmInline annotation in value classes since
it breaks reflection.
2020-11-27 23:52:06 +01:00
Dmitry Petrov
a206eca164
JVM_IR KT-43611 report signature clash on private interface members
2020-11-27 18:54:09 +03:00
Mikhail Glukhikh
bf2b318bee
Simplify FirSupertypeInitializedInInterfaceChecker
2020-11-26 08:37:51 +03:00
Mikhail Glukhikh
1e3621a896
FIR checkers: simplify hasPrimaryConstructor by source element check
2020-11-26 08:37:49 +03:00
Mikhail Glukhikh
e7e162c7eb
[FIR TEST] Filter some particular tokens during createDebugInfo
2020-11-26 08:37:47 +03:00
Mikhail Glukhikh
3dec848c03
[FIR] Implement light tree DECLARATION_NAME & SIGNATURE strategies
2020-11-26 08:37:47 +03:00
pyos
7327c20200
FIR: add a resolution mode for property delegates
...
Like function arguments, they are context-dependent, but unlike function
arguments, callable references should be resolved eagerly as if they are
explicit receivers.
2020-11-25 16:55:10 +03:00
Victor Petukhov
0857b9c9e7
Rethink constraints incorporation
...
Namely, remove incorporation “otherInsideMyConstraint” to eliminate
constraint system redundancy and produce a potentially very large number
of constructs.
Instead, introduce not so “spreadable” incorporation during variable
fixation (equality constraint with result type into other constraints).
^KT-41644 Fixed
^KT-42195 Fixed
^KT-42920 Fixed
^KT-42791 Fixed
^KT-41741 Fixed
2020-11-25 11:15:20 +03:00
Dmitry Petrov
3a166f3592
KT-43525 forbid @JvmOverloads on mangled funs and hidden constructors
2020-11-24 16:06:20 +03:00
Ilmir Usmanov
c62093f54c
IC mangling: Change mangling rules
...
1. Use 'x' for each parameter, which is not an inline class, every
possible clash is handled by signature rather than name. This change
makes more API changes binary-compatible. So, the changes are in line
with the vision of inline classes are value classes, like primitives.
2. Take return type into account when mangling a function if the return
type is inline class. Otherwise, boxing bridge will not be generated,
which leads to CCE at runtime.
2020-11-19 17:39:24 +01:00
Jinseong Jeon
9a99af53ba
FIR JVM: correct signature conversion for array
...
#KT-43339 Fixed
2020-11-18 13:06:51 +03:00
Jinseong Jeon
fc7f589caa
FIR Java: record Java types with flexible nullability
2020-11-18 13:06:46 +03:00
Denis Zharkov
14305d1eba
FIR: Simplify callable references resolution
...
Also that fixes some bugs
2020-11-16 15:50:39 +03:00
Denis Zharkov
d4c7d4fc7c
FIR: Fix callable references resolution with stub receivers
...
Use stubReceiver as a receiver for fake calls
See issues KT-43358 KT-43359 KT-43378
2020-11-16 15:50:39 +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
Denis Zharkov
4c9a4548f2
FIR: Fix overrides binding for Java inheritor
...
`overriddenMembers` contract requires original (non-enhanced) function
See other usages
Ignored tests have been working accidentally
^KT-43289 Open
2020-11-16 15:50:39 +03:00
Dmitriy Novozhilov
419f54259c
[TEST] Change semantics of CHECK_TYPE directive and update testdata
...
Previously helpers from checkType.kt was in special package, and
if directive was enabled then test runner (`AbstractDiagnosticTest`)
injected additional imports to test files and removed them after test
was completed.
It's very hard to support such behavior in new test infrastructure so
there was a decision about changing `CHECK_TYPE`:
1. All helpers from `checkType.kt` now stays in default package
2. `CHECK_TYPE` only adds `checkType.kt` to set of analyzed files
and don't modify their content
For test which are written in default package (most of tests actually)
there are no changes. On the other hand if there is a test where dev
want to use checkType functions in testfile with some package then he
should explicitly import functions which he needed (`checkSubtype`,
`checkType`, `_`)
2020-11-13 10:36:12 +03:00
Dmitriy Novozhilov
87380d1913
[FIR] Don't assume that exit lambda node is target for exceptional exit for inplace lambdas
...
#KT-39709 Fixed
#KT-43156 Fixed
2020-11-12 14:46:38 +03:00
Jinseong Jeon
440cf78884
FIR CFG: add more uncaught exception paths
2020-11-12 14:46:37 +03:00
Jinseong Jeon
7b06885348
FIR checker: reproduce KT-43156
2020-11-12 14:46:36 +03:00
sebastian.sellmair
06cb64bb51
Allow open callable members in expect interfaces
...
#KT-42094 fixed
2020-11-11 17:41:59 +00:00
Dmitriy Novozhilov
67b262aa34
[FIR] Move tracking candidate applicability from CheckerSink to Candidate
2020-11-11 09:52:56 +03:00
Dmitriy Novozhilov
9f5aadd2f4
[FIR] Implement overload resolution by lambda return type
...
#KT-43129 Fixed
2020-11-11 09:52:55 +03:00
Denis Zharkov
233bb47b99
FIR: Fix SAM conversion for raw types with non-trivial TP upper bounds
2020-11-10 14:26:54 +03:00
Denis Zharkov
a5545b96cb
FIR: Fix ambiguity between current Companion and one from supertypes
...
Companion as qualifier should be found at static scope not a member one
2020-11-10 14:26:54 +03:00
Denis Zharkov
96c3436e73
FIR: Temporary adjust diagnostics test data
...
UPPER_BOUND_VIOLATED for type alias constructors is not supported properly
See KT-43142
2020-11-06 11:32:39 +03:00
Victor Petukhov
90ea64a0e5
Don't report warning about changing execution order for varargs if it's inside an annotation
...
^KT-43110 Fixed
2020-11-05 13:18:00 +03:00
Victor Petukhov
f052bc341c
Don't report warning about implicitly inferred Nothing for call arguments if there is non-Nothing return type
...
^KT-43108 Fixed
2020-11-05 13:17:59 +03:00
Jinseong Jeon
a5389b067b
FIR DFA: use element-wise join everywhere
2020-11-04 16:35:42 +03:00
Jinseong Jeon
771c839d74
FIR DFA: element-wise join at merging points of try expression
2020-11-04 16:35:42 +03:00
Jinseong Jeon
bd173ebebc
FIR DFA: isolate effects between blocks in try expression
2020-11-04 16:35:42 +03:00
Jinseong Jeon
146036010c
FIR DFA: add tests about smartcasts in/after try-catch-finally
2020-11-04 16:35:42 +03:00
Ilmir Usmanov
326768e8b5
Minor. Update test data
2020-11-04 00:20:39 +01:00
Denis Zharkov
a936386e53
FIR: Add more complicated workaround for OverloadResolutionByLambdaReturnType
...
That helps for minOfOrNull/maxOfOrNull
2020-11-03 18:30:15 +03:00
Denis Zharkov
4612f26bfb
FIR: Add workaround for OverloadResolutionByLambdaReturnType
...
Mostly, that should help for existing flatMap usages
^KT-43129 Submitted
2020-11-03 18:30:15 +03:00