Commit Graph

1146 Commits

Author SHA1 Message Date
Mikhael Bogdanov 6c07dbf351 JVM_IR. Support type annotations 2020-01-29 16:59:55 +01:00
Mikhail Glukhikh 53d50c935a [FIR] Do not use strict type equality in override checker 2020-01-29 15:58:12 +03:00
Mikhail Glukhikh e43a57bdee [FIR] Do not process constructors in super-type scopes 2020-01-29 15:58:04 +03:00
Mikhail Glukhikh b4267558d7 [FIR] Fix constructors aliased importing 2020-01-29 15:57:47 +03:00
Mikhail Zarechenskiy e3b6104489 [NI] Map vararg to Array if it's resolved against type variable
While this behavior is questionable, it's consistent with OI and can
 be changed in future

 #KT-36201 Fixed
2020-01-29 11:43:14 +03:00
Mikhail Zarechenskiy 35f6810b58 [NI] Do not incorporate constraints that are needed only for nullability 2020-01-29 11:43:13 +03:00
Denis Zharkov e725f255f1 FIR: Share the same ScopeSession instance between phases
^KT-34563 Fixed
2020-01-29 11:31:57 +03:00
Denis Zharkov 280fb94774 FIR: Cache file importing scopes 2020-01-29 11:31:57 +03:00
Denis Zharkov 0b2b23189a FIR: Cache default importing scopes 2020-01-29 11:31:57 +03:00
Denis Zharkov 95084a5312 FIR: Minor. Inline unused parameter in FirDefaultStarImportingScope 2020-01-29 11:31:57 +03:00
Mikhail Glukhikh 3f95ac341c [FIR] Implement SAM candidates discrimination 2020-01-29 11:09:28 +03:00
Denis Zharkov 70ce63c8d4 FIR: Support rewritten implicit types calculator in IDE
Unlike the compiler, in the IDE different files may have different
resolve state.

So using ReturnTypeCalculatorForFullBodyResolve may be not correct there
2020-01-28 17:03:50 +03:00
Denis Zharkov c6c773f6f9 FIR: Mark all dependencies' declarations as fully resolved 2020-01-28 17:03:50 +03:00
Denis Zharkov dd51d5065a FIR: Rename classes properly in FirImplicitBodyResolve.kt 2020-01-28 17:03:50 +03:00
Denis Zharkov 1cb18a73db FIR: Get rid of old FirImplicitTypeBodyResolveTransformerAdapter 2020-01-28 17:03:50 +03:00
Denis Zharkov f2abb57021 FIR: Introduce and use FirClass<*>::unsubstitutedScope 2020-01-28 17:03:50 +03:00
Denis Zharkov 6e8d67b96f FIR: Simplify contract in FirScopeProvider::getUseSiteMemberScope 2020-01-28 17:03:50 +03:00
Denis Zharkov de4bfb3973 FIR: Implement FirApplyInferredDeclarationTypesTransformer 2020-01-28 17:03:50 +03:00
Denis Zharkov 8e672222bb FIR: Do not resolve implicitly typed function twice 2020-01-28 17:03:50 +03:00
Denis Zharkov c295f2dc25 FIR: Reimplement implicit types calculator
Make it works through a single component tracking computation status
instead of storing it in the nodes
2020-01-28 17:03:50 +03:00
Dmitriy Novozhilov 056c3c95bb [FIR-TEST] Remove unnecessary test 2020-01-28 14:14:21 +03:00
Dmitriy Novozhilov ff3116f0ed [FIR] Support intersection types in some type context methods 2020-01-28 14:14:21 +03:00
Dmitriy Novozhilov 57a1342aac [FIR] Fix creating DefinitelyNotNullTypes
Also fix substitutions to them
2020-01-28 14:14:21 +03:00
Dmitriy Novozhilov 4303cd2fc7 [FIR] Put rendering of cone types in one place and change render for error types 2020-01-28 14:14:21 +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 ce1f746c5e [FIR] Allow more than one function with some name in local scope 2020-01-28 09:36:56 +03:00
Ilya Chernikov 9623b0eedb Report error instead of assertion when property is used as operator
#KT-34857 fixed
2020-01-27 10:10:44 +01:00
Ilya Chernikov a1acb4afaf Return correct PSI expression for EmptyLabeledReturn
Fixes diagnostic reporting for appropriate constraint error
#kt-32792 fixed
2020-01-27 10:10:44 +01:00
Mikhail Glukhikh dc4f332c08 [FIR] Implement early calculation of "not SAM" flag for classes 2020-01-27 00:34:17 +03:00
Mikhail Glukhikh 279adae3e4 [FIR] Implement primitive tower for type resolving 2020-01-27 00:34:17 +03:00
Mikhail Glukhikh 7721eaab23 [FIR] Transform qualified access / callable refs type arguments properly 2020-01-27 00:34:17 +03:00
Mikhail Glukhikh 483ce8bf04 [FIR TEST] Stabilize top-level extension vs outer member behavior 2020-01-27 00:34:17 +03:00
Mikhail Glukhikh 14204a842a Refactoring & clarification: implement new FIR tower resolver 2020-01-27 00:34:16 +03:00
simon.ogorodnik a3ab763f0b [FIR] Get rid of processors in FirScope 2020-01-27 00:34:16 +03:00
Victor Petukhov 5c6e710013 Revert "Workaround an inliner problem upon which the compiler code itself stumbled ^KT-35856 Fixed"
This reverts commit 59175912
2020-01-24 16:41:22 +03:00
Dmitriy Novozhilov 3dfad4f0c3 [FIR] Fix generating properties for varargs in primary constructors 2020-01-24 10:57:52 +03:00
Dmitriy Novozhilov 69927409fc [FIR] Fix exhaustiveness check when subject has flexible type 2020-01-24 10:57:52 +03:00
Ilya Gorbunov 39078342ee Remove mod function deprecation tests
#KT-26654
2020-01-23 19:28:23 +03:00
Ilya Gorbunov 9fffa61596 Update builtin serialization tests
#KT-26654
2020-01-23 19:28:22 +03:00
Pavel Kirpichenkov 78c9bbcc0d [NI] Soften restictions on using Nothing as proper constraint for full call completion
Consider lower `Nothing` constraint non-proper only if there is a dependant not analyzed postponed atom.
Early completion to `Nothing` provides data flow info for smart casts.

KT-35668 Fixed
2020-01-23 19:12:01 +03:00
Mikhail Zarechenskiy f1d9177112 [NI] Fix issue with returning non-deparenthesized lambdas from labmdas
#KT-36080 Fixed
2020-01-23 18:56:02 +03:00
Mikhail Zarechenskiy 7bd7db839d [NI] Fix adapting arguments for callable references with receivers
#KT-35912 Fixed
2020-01-23 18:56:00 +03:00
Dmitriy Novozhilov 194d5a61dc [FIR-TEST] Add tests with problems of fir resolve 2020-01-23 14:52:56 +03:00
Dmitriy Novozhilov 14cf7a3d16 [NI] Add collecting forgotten type variables from callable references
#KT-35959 Fixed
2020-01-23 14:30:28 +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
Pavel Kirpichenkov 3a98c84105 [NI] Make behaviour of anonymous functions consistent with lambdas
Fix completion of anonymous functions with expression body without expected type.
Premature completion led to losing type info from outer calls.
Also report type mismatches on empty lambda expressions.

KT-34729 In progress
2020-01-23 13:18:49 +03:00
Mikhail Glukhikh 94ec22762a Rename: FirLibrarySymbolProviderImpl -> FirBuiltinSymbolProvider 2020-01-23 12:32:41 +03:00
Mikhail Glukhikh 2086c34cb9 [FIR] Fix callable references to fields / parameters / etc.
Before this commit, only references to functions & properties
were possible, now fields & parameters are also supported
2020-01-23 12:32:40 +03:00
Mikhail Glukhikh c37394ec83 [FIR] Count alias reference with type arguments as qualifier w/out value 2020-01-23 12:32:40 +03:00
Mikhail Glukhikh e39df5bb91 [FIR] Support type aliases in double colon expression resolver 2020-01-23 12:32:40 +03:00