pyos
1f9db7cf25
FE: properly clear the deferred generator stack
...
Before this commit the stack wasn't cleared for read variable case.
#KT-47168 Fixed
2021-06-11 15:56:20 +03:00
Tianyu Geng
ce767046eb
FIR checkers: report SMARTCAST_IMPOSSIBLE
2021-06-10 16:01:13 +03:00
Mikhail Glukhikh
63bc3f9708
Forbid experimental markers on various targets #KT-45845 Fixed
...
In this commit we forbid experimental markers on:
- local variables
- value parameters
- fields, including delegate fields
- property getters
2021-06-08 11:37:34 +03:00
Mikhail Glukhikh
eb9c658c1c
OptIn: handle usages via type aliases properly
2021-06-08 11:37:33 +03:00
Mikhail Glukhikh
b4ee116de7
Experimental checkers: simplify visiting code a bit
2021-06-08 11:37:32 +03:00
Mikhail Glukhikh
702d839c66
Forbid TYPE and TYPE_PARAMETER as possible OptIn targets
2021-06-08 11:37:31 +03:00
Mikhail Glukhikh
603afe89a2
Forbid using experimental markers on override declarations
...
#KT-45844 Fixed
2021-06-08 11:37:30 +03:00
Mikhail Glukhikh
bb9efab3c4
Forbid experimental markers on getter #KT-45845 Fixed
2021-06-08 11:37:29 +03:00
Mikhail Glukhikh
0a670bf055
Report EXPERIMENTAL_API diagnostics on various implicit usages
...
#KT-32443 Fixed
#KT-22852 Fixed
2021-06-08 11:37:28 +03:00
Mikhail Glukhikh
d8d38862d9
Introduce EXPERIMENTAL_ANNOTATION_WITH_WRONG_RETENTION diagnostic
...
#KT-22941 Fixed
2021-06-08 11:37:27 +03:00
Mikhail Glukhikh
7393465696
Don't report EXPERIMENTAL_OVERRIDE_ERROR on annotated local functions
...
#KT-31728 Fixed
2021-06-08 11:37:26 +03:00
Andrey Zinovyev
7c669b65c3
[FIR] Implement CONFLICTING_IMPORT diagnostic
2021-06-08 08:18:55 +00:00
Andrey Zinovyev
bf153ab0f0
[FIR] Implement CANNOT_ALL_UNDER_IMPORT_FROM_SINGLETON diagnostic
2021-06-08 08:18:54 +00:00
Victor Petukhov
19c07e048a
Don't check suitability of a builder inference call if unrestricted builder inference is enabled
...
^KT-42139 Fixed
2021-06-03 17:28:40 +03:00
Dmitry Savvinov
708fead1cc
Add debug strings to frontend scopes-related structures
...
Such as:
- PackageFragmentProviders, and, in particular,
CompositePackageFragmentProviders
- JavaPackageFragments
- Scopes produced by those providers
The rationale is that a lot of frontend-facing bugs (like red code) are
easily recognizeable in resolution. But at that point you just see a
bunch of scopes, without meaningful toStrings, you don't know who has
produced them, and what's exactly wrong.
With this commit it should make debugging slightly easier: now at least
you'll be able to see that "this scope is a scope of package fragment
for foo.bar of module baz" and decide whether the declaration should or
should not have been resolved from such scope.
2021-06-03 17:21:59 +03:00
Victor Petukhov
124a14c8df
Use separate constraint position during call substitution as part of inferring postponed type variables
...
^KT-47052 Fixed
^KT-47082 Fixed
2021-06-03 12:37:17 +03:00
Alexander Udalov
dfea915f92
Remove dependency of frontend on compiler.common.jvm
...
Looks like it was added accidentally in 564d382b9d; common frontend
shouldn't depend on JVM-specific modules.
Since then, it has been accidentally used in two places in
ir.serialization.common to refer to JVM specifics, and that should be
abstracted away in the future.
2021-06-01 20:28:23 +02:00
Alexander Udalov
81ce1da352
Move PsiSourceElement to psi
2021-06-01 20:28:23 +02:00
Alexander Udalov
bcf47ddc94
Move optional annotation utilities to module 'resolution'
...
To avoid depending on a heavy module 'frontend' in parts of the compiler
where checking for optional annotations is needed, such as in
'ir.serialization.common'.
2021-06-01 20:28:22 +02:00
Alexander Udalov
e790fa8ac9
Remove dependency of serialization on frontend
...
Move ApplicationExtensionDescriptor and ProjectExtensionDescriptor to
:compiler:util.
2021-06-01 20:28:22 +02:00
Mikhael Bogdanov
b72aa76415
Support class type parameters annotation checking
2021-06-01 06:33:51 +02:00
Mikhael Bogdanov
a8186d19d6
Support annotations on class type parameters
...
#KT-43714
2021-06-01 06:33:50 +02:00
Victor Petukhov
76c15e4444
Don't update null recorded type prematurely in ResolvedAtomCompleter
2021-05-28 15:36:23 +03:00
Victor Petukhov
4a767c597e
Don't report the same diagnsotics several times
2021-05-28 15:36:23 +03:00
Victor Petukhov
e942052eb6
Substitute stub type variables in local variable descriptors
2021-05-28 15:36:22 +03:00
Victor Petukhov
be22078bd1
Return empty NotFixedToInferredTypesSubstitutor if the current substitutor is empty
2021-05-28 15:36:22 +03:00
Victor Petukhov
d8c68aacdd
Split setting substitutor descriptor for entire resolved call into two parts: setting resulting substitutor and setting substitutor for resolved call's types
2021-05-28 15:36:22 +03:00
Victor Petukhov
31ed1ad5d9
Use recorded into descriptor inferred callable reference input/output types, to prevent leaking raw type parameter's types of reflectionCandidateType into the back-end
2021-05-28 15:36:21 +03:00
Victor Petukhov
84bd580f92
Complete block expressions to substitute stub type variables into last callable references there
2021-05-28 15:36:21 +03:00
Victor Petukhov
472ab09511
Do stub types substitution for property initializer's type
2021-05-28 15:36:20 +03:00
Victor Petukhov
ac222fdb41
Update type for both version of expression: parenthesis and not
2021-05-28 15:36:20 +03:00
Victor Petukhov
c0ad1c9b18
Do substitution of stub types inside smartcast types to further write it into trace and prevent dealing with that in the back-end
2021-05-28 15:36:20 +03:00
Victor Petukhov
26cbb020db
Use resulting descriptor for old callable references to substitute stub type variables
2021-05-28 15:36:20 +03:00
Victor Petukhov
3ff22b67f7
Substitute type arguments of old callable references as well
2021-05-28 15:36:20 +03:00
Victor Petukhov
d5be258291
Do substitution for receivers of old (by passing though OI) callable references properly, with avoiding premature returning from the method
2021-05-28 15:36:19 +03:00
Victor Petukhov
9fd1cbd2e7
Inject stub type variables of a different builder inference call properly
2021-05-28 15:36:19 +03:00
Victor Petukhov
d486f7e188
Don't report TYPE_INFERENCE_POSTPONED_VARIABLE_IN_RECEIVER_TYPE if unrestricted build inference was enabled
2021-05-28 15:36:19 +03:00
Victor Petukhov
0f317b01b4
Rename language feature StableBuilderInference to UnrestrictedBuilderInference
2021-05-28 15:36:19 +03:00
Victor Petukhov
6356b9d501
Put removing builder inference restrictions under the compiler flag
2021-05-28 15:36:17 +03:00
Victor Petukhov
5a11450d77
Split stub types into stub type for subtyping and for builder inference and use them in the proper way
2021-05-28 15:36:17 +03:00
Victor Petukhov
703a353d2e
Determine empty constraint system for a builder inference call by presense of not fixed type variables
2021-05-28 15:36:17 +03:00
Victor Petukhov
c5faf532f5
Allow builder inference calls with labeled lambda
...
^KT-24993 Fixed
2021-05-28 15:36:16 +03:00
Victor Petukhov
90066d7e50
Add expected type constraints in a builder inference call
2021-05-28 15:36:16 +03:00
Victor Petukhov
7da47dcde8
Add type variables into common system of a builder inference call properly
2021-05-28 15:36:15 +03:00
Victor Petukhov
ac7b459f2a
Do subtyping with stub types properly
...
1) Return stub type if we are calculating super type between two same stub types
2) Return nullable Any if those stub types are different
2021-05-28 15:36:15 +03:00
Victor Petukhov
5d0461c722
Remove restrictions for builder inference internal calls
2021-05-28 15:36:14 +03:00
Tianyu Geng
61475c48e2
FIR: fix VALUE_ARGUMENTS position strategy
2021-05-26 14:46:18 +03:00
Ivan Kochurkin
ef53f0e0b3
[FIR] Render diagnostics parameters instead of full text in debug messages (closer to old tests)
2021-05-25 00:07:32 +03:00
Ivan Kochurkin
6de97e17fe
[FIR] Fix max parameters count in diagnostics from 3 to 4
2021-05-25 00:07:30 +03:00
Tianyu Geng
cceb7197a5
FIR: allow nullable types in diagnostic parameters
2021-05-20 20:32:59 +02:00