Dimach
f0035a7be0
KT-17379: Fix J2K removal of parentheses in multiline expressions
...
When there is multiline polyadic expression with some operators
J2K should keep surrounding parentheses, otherwise
operators will be dangling due resolved to prefix variant
#KT-17379 fixed
2017-08-23 20:47:01 +03:00
Mikhail Zarechenskiy
c45f86a2fc
[NI] Resolve function literals in block as lambda expression
2017-08-23 15:53:52 +03:00
Mikhail Zarechenskiy
08964006de
[NI] Avoid type capturing for types that can contain type variables
2017-08-23 15:53:51 +03:00
Mikhail Zarechenskiy
e040a317cc
[NI] Store setValue with fresh type variables before substitution
2017-08-23 15:53:50 +03:00
Mikhail Zarechenskiy
963ab7f27f
[NI] Fix KNPE, exception occurred when element is synthetic
2017-08-23 15:53:47 +03:00
Mikhail Zarechenskiy
f42be4aea2
[NI] Fix exception explicit qualified receiver and dispatch receiver
2017-08-23 15:53:46 +03:00
Stanislav Erokhin
d9eef94a8e
[NI] Support smartcast info in ResolvedCall on receivers
2017-08-23 15:53:43 +03:00
Stanislav Erokhin
cb1270836c
[NI] Introduced ResolutionAtom's
...
Introduced new model for resolution result: tree of ResolvedAtoms.
Moved all postprocessing for arguments to front-end module.
Do not create freshDescriptor -- use freshTypeSubstitutor directly.
Removed Candidates for variables+invoke.
Add lazy way for argument analysis -- do not analyze all arguments
if we have subtyping error in first argument, but if we want report
all errors, then all arguments checks will be performed.
Future improvements:
- optimize constraint system usage inside ResolutionCandidate
- improve constraint system API
- improve diagnostic handlers
2017-08-23 15:53:42 +03:00
Stanislav Erokhin
ff1e230828
[NI] Use right scope for callable reference resolution
...
Previously was used scope for top-level call. It isn't correct because
if we have callable reference inside lambda -> scope is different.
2017-08-23 15:53:38 +03:00
Stanislav Erokhin
6b8293ae5b
Refactoring. Remove ResolutionCandidateStatus.
...
Use diagnostics directly.
Also TowerCandidate since now know only about applicability
and not about diagnostics itself.
2017-08-23 15:53:36 +03:00
Stanislav Erokhin
aca21c847d
[NI] Fix resolution for callable references to nested class members
2017-08-23 15:53:35 +03:00
Stanislav Erokhin
1ae4ad1598
[NI] Do not take type advice for delegation if type is not fixed
2017-08-23 15:53:34 +03:00
Stanislav Erokhin
cdaa98fb63
[NI] Fixes after review
2017-08-23 15:53:33 +03:00
Stanislav Erokhin
2b01b91315
[NI] Refactoring: KotlinCallContext to stateless component (2)
2017-08-23 15:53:32 +03:00
Stanislav Erokhin
e88c1b4f0a
[NI] Refactoring: KotlinCallContext to stateless component (1)
2017-08-23 15:53:31 +03:00
Stanislav Erokhin
9bbfac11b4
[NI] Add common supertype for PSI lambda arguments
...
Also move initial dataFlowInfo to lambda arguments.
As result, we can not store outer call for postpone call arguments
2017-08-23 15:53:30 +03:00
Pavel V. Talanov
6424b6760f
Remove StorageComponentContainerContributor::onContainerComposed
...
Rename addDeclarations -> registerModuleComponents
Use it to provide SamWithReceiverResolver extensions instead
Post construction on container composition can be achieved
but manually inserting injections where it seems appropriate
is bug prone
This fixes a bug where SamWithReceiverPlugin extension was not registered
for some containers in IDE which led to incorrect highlighting in IDE
Add IDE test for applying SamWithReceiver plugin
#KT-18062 Fixed
2017-08-18 19:11:25 +03:00
Mikhail Glukhikh
0adf1d210f
Make KtPureElement.getParent() nullable #KT-19760 Fixed
...
The reason is KtFile.getParent() is a containing directory which is nullable
2017-08-18 15:36:41 +03:00
Mikhail Glukhikh
9dc5354f24
Eliminate some warnings (mostly redundant is checks in whens)
2017-08-18 15:16:59 +03:00
Mikhail Glukhikh
3623f581b8
Eliminate a set of warnings, mostly nullability ones
2017-08-18 15:10:27 +03:00
Mikhael Bogdanov
79ecc7fd5c
Don't recognize nullable function types as inlinable
...
#KT-19679 Fixed
2017-08-17 14:24:00 +02:00
Mikhail Glukhikh
a12877e51c
Add feature support for "smart casts on variables in closures"
...
So #KT-14486 Fixed
2017-08-16 12:34:04 +03:00
Mikhail Glukhikh
a086863561
Preliminary: support smart casts on variables in closures
...
No feature support yet
So #KT-14486 In Progress
2017-08-16 12:33:52 +03:00
Mikhail Glukhikh
b2d931fb1f
Support smart casts after if (nullable ?: boolean) #KT-8492 Fixed
2017-08-16 12:33:35 +03:00
Mikhail Glukhikh
80b6aaa802
Support smart casts to Type after x as? Type null check #KT-4565 Fixed
2017-08-16 12:33:12 +03:00
Alexey Sedunov
f5c7db8270
Change Signature: Support constructors of header/impl classes
2017-08-15 19:08:26 +03:00
Alexey Sedunov
0b44386800
Change Signature: Fix NPE on rendering empty parameter names
2017-08-15 19:08:26 +03:00
Alexey Sedunov
e4f70a3568
Rename: Support members of header/impl classes
...
#KT-18885 Fixed
#KT-18898 Fixed
#KT-18899 Fixed
2017-08-15 19:08:26 +03:00
Dmitry Jemerov
e3963fccf4
Move Gradle-related classes to idea-gradle module
2017-08-15 16:51:42 +02:00
e5l
5501cdf049
Add warnings for jsr305 nullable annotations
...
#KT-19115 Fixed
2017-08-15 11:01:08 +03:00
Mikhail Glukhikh
830b543879
Fix of EA-105681 in KotlinRunLineMarkerContributor
2017-08-14 17:37:05 +03:00
Dmitry Petrov
a8c82b64a1
Do not check bounds in type alias expansion if checkBounds is false
...
This happens when we resolve bounds for type parameters, causing wrong
UPPER_BOUND_VIOLATED to be reported on type parameter whose bounds were
not resolved yet.
#KT-19601 Fixed Target versions 1.1.5
2017-08-11 11:29:59 +03:00
Alexey Tsvetkov
bb2fab5b5d
Extract LookupTracker service from IncrementalCompilationComponents
...
We don't need a `TargetId` to `IncrementalCache` mapping in JS
2017-08-10 21:19:42 +03:00
Dmitry Petrov
674d30cd76
Report deprecation on typealias companion object for deprecated alias
2017-08-10 15:45:44 +03:00
Dmitry Petrov
c180de563f
Support DslMarker on type aliases
2017-08-10 15:45:44 +03:00
Mikhail Zarechenskiy
974dad571c
[NI] Report errors about inapplicable wrong receiver
...
Now it's possible because we don't commit trace with inapplicable `provideDelegate` operator (20e105c274 )
2017-08-09 17:37:44 +03:00
Dmitry Jemerov
a7bbf3d1f8
Don't increase OOCB count when a REPL line is modified
2017-08-09 13:26:09 +02:00
Dmitry Jemerov
3415853cac
Add ModuleDescriptor.assertValid() for ensuring consistency
2017-08-09 13:26:09 +02:00
Dmitry Jemerov
ac96c31a7d
Retrieve module descriptors for implementing modules on demand
2017-08-09 13:26:09 +02:00
Dmitry Jemerov
0b45d25bb1
Fix compilation after rebase
2017-08-09 13:26:09 +02:00
Dmitry Jemerov
bdbe134b60
Recreate module descriptors for affected modules only on a change
2017-08-09 13:26:09 +02:00
Dmitry Jemerov
07794c8188
On-demand creation of ModuleDescriptors
2017-08-09 13:26:09 +02:00
Dmitry Jemerov
36cabf1bfc
Move entire logic for ModuleDescriptor setup into ResolverForProjectImpl
2017-08-09 13:26:09 +02:00
Dmitry Jemerov
d6a9a49968
Disable tracking of Kotlin files by Java OOCB listener
2017-08-09 13:26:09 +02:00
Dmitry Jemerov
aafe7e6f1b
Refactoring: move createResolverForModule() into ResolverForProjectImpl
2017-08-09 13:26:09 +02:00
Dmitry Jemerov
3debca09ea
Remove callback hell from LazyModuleDependencies
2017-08-09 13:26:09 +02:00
Mikhail Zarechenskiy
cfbc559a97
[NI] Propagate tracking binding trace into context
2017-08-09 14:01:04 +03:00
Mikhail Zarechenskiy
4a74ca568c
[NI] Don't forget to deparenthesize expression before type checking
2017-08-09 14:01:00 +03:00
Mikhail Zarechenskiy
20e105c274
Don't commit trace with inapplicable provideDelegate operator
...
This helps in NI as there we have different logic for delegates inference
2017-08-09 13:50:50 +03:00
Mikhail Zarechenskiy
46d0ea3eed
Use operation reference as lookup element to preserve old behaviour
...
See related changes in fb72726f08
2017-08-09 00:59:12 +03:00