Commit Graph

57 Commits

Author SHA1 Message Date
Dmitriy Novozhilov 48fb279721 [FIR] Add constraint to flexible type for declared argument for java parameter 2020-03-27 10:17:12 +03:00
Mikhail Glukhikh 1bad380381 FIR: fix test data in IDEA multi-module tests 2020-03-02 10:03:49 +03:00
Dmitriy Novozhilov 4454a0681b [FIR] Get rid of copying function call in process of completion 2020-03-02 09:49:28 +03:00
Mikhail Glukhikh e051251b27 FIR: set isOperator only for Java methods with appropriate names
#KT-35133 Fixed
2020-02-19 18:09:04 +03:00
Denis Zharkov a6cf16ddfc FIR: Fix test data for FirMultiModuleResolveTestGenerated 2020-02-19 17:21:11 +03:00
Juan Chen 188abc243a [FIR] add vararg arguments support, improve vararg parameters support 2020-01-31 16:41:25 +03:00
simon.ogorodnik 5e426fdc71 [FIR] Optimization & checking fix: remove usage of dispatchReceiverValue 2019-12-27 13:45:59 +03:00
Mikhail Glukhikh 7d62e3ce56 FIR: fix hasTopLevelClassOf optimization in deserialized provider
Before this commit, we answered 'no top level class' if Java class finder
could not calculate known class names. However, it's incorrect,
because this situation means 'don't actually know'.

To precise semantics, function name was also inverted
2019-12-10 12:58:39 +03:00
Mikhail Glukhikh fe6be0f436 Fix failed FIR multi-module test (forgotten test data update) 2019-12-03 10:25:53 +03:00
Mikhail Glukhikh d15dae6ac6 FIR: use SyntheticPropertySymbol & synthetic scope instead of FirAccessorSymbol
Before this commit, we used FirAccessorSymbol to emulate synthetic properties.
These symbols were generated in Java use-site scope.
Now, we use synthetic scope instead which is above MemberScopeTowerLevel.
This is more performance-friendly and does not require override matching.
However, accessor symbols should be used in situation when Java accessor
overrides Kotlin property which is broken in this commit
(that's why MapEntry test is corrupted here).
Also, we should not create synthetics for pure Kotlin accessors
(that's why javaAccessorConversion test is corrupted here).
2019-11-29 18:11:25 +03:00
Mikhail Glukhikh f1eb0dff1f FIR: disable synthetic scope, make accessor symbols synthetic
Before this commit, we had two methods to do generally the same synthetic thing.
It's an attempt to keep only one of them.
Accessor symbols are generated in Java use-site member scopes,
at this place we know better whether we are in Java class or not.
However, we have to do this at every use-site level, which is relatively slow.
Also we could encounter problems when accessor function is overridden in Kotlin,
and accessor symbol can still contain reference to Java accessor.
2019-11-29 18:09:07 +03:00
Mikhail Glukhikh 1e548e3f21 FIR substitution: use intersection of bounds for * projection 2019-11-19 13:07:46 +03:00
Dmitriy Novozhilov 950d1f4fe4 [FIR] Fix enhancement of java array type 2019-11-19 10:43:46 +03:00
Mikhail Glukhikh 79c0a69219 Add new FIR tests related to KT-31508 problems, replace failing MM testJava...Signature 2019-10-17 13:39:32 +03:00
Mikhail Glukhikh f2c77c45e9 FIR: simplify rendering of dispatch & extension receivers 2019-08-30 11:47:33 +03:00
Mikhail Glukhikh 62bb127fc9 FIR: add K/J test with getValue() / value fake cycle 2019-08-30 11:47:32 +03:00
Mikhail Glukhikh b531e535b6 FIR call resolve: set values of dispatch & extension receivers 2019-08-30 11:47:31 +03:00
Dmitriy Novozhilov ef4ef08b1d [FIR] Add default upper bound for java type parameters 2019-08-30 11:10:31 +03:00
Dmitriy Novozhilov e6bf3b3263 [FIR] Render nullability in type renderer, not in fir renderer 2019-08-22 10:55:07 +03:00
Mikhail Glukhikh 2ceffa241b FIR: make Java default constructor visibility same with class visibility 2019-07-11 12:38:53 +03:00
Mikhail Glukhikh 14bbbb5bf5 FIR: add test for synthetic property access 2019-07-11 12:37:45 +03:00
Mikhail Glukhikh 806d2d628c FIR Java: correctly handle overridden Kotlin properties in use-site scope 2019-05-28 10:20:41 +03:00
Mikhail Glukhikh 56435fa283 FIR Java: add default constructors 2019-05-28 10:20:40 +03:00
Mikhail Glukhikh d0404b2c2a FIR resolve: check number of parameters when handling Java accessors 2019-05-28 10:20:38 +03:00
Mikhail Glukhikh be18134270 FIR multi-module: minor test data fixes after resolve enhancements 2019-04-30 18:45:54 +03:00
Simon Ogorodnik 3e69838f48 FIR Java: map classes to make java type-parameters have correct bounds
Really, this commit implements early J2K mapping for all Java types.
It's questionable and probably wrong at least for super-types,
because, for example, we cannot resolve spliterator() in classes
derived from java.lang.Iterable
2019-04-30 18:45:51 +03:00
Simon Ogorodnik 73b1676a03 Raw FIR: fix unary operators (now convention calls use receivers) 2019-04-23 11:40:32 +03:00
Mikhail Glukhikh cf72b13d84 Add accessor symbols & test for property overriding in Java 2019-04-23 11:15:24 +03:00
Mikhail Glukhikh 568e831651 FIR: make rendering of type parameters similar to original Kotlin 2019-04-10 13:31:02 +03:00
Mikhail Glukhikh 0c334163ab FIR: add class type parameters to constructors & change their rendering 2019-04-10 13:31:01 +03:00
Mikhail Glukhikh 33729aaf9b Raw FIR: add Any/Enum/Annotation to supertypes iff no supertypes exists 2019-04-04 10:30:44 +03:00
Mikhail Glukhikh 4187ea1f86 Raw FIR: add initializers to primary constructor properties 2019-04-04 10:30:40 +03:00
Denis Zharkov aec5ec89e7 FIR: Support deserialization for built-in classes content 2019-03-27 17:17:59 +03:00
Denis Zharkov f03c5e0583 FIR: Support loading built-in top-level functions 2019-03-27 17:17:59 +03:00
Mikhail Glukhikh 0546548ff3 Raw FIR: add kotlin.Any super class if no super classes are visible 2019-03-25 17:17:14 +03:00
Simon Ogorodnik b617c40051 FIR: Update testData for fir multi-module test (rendering+body resolve) 2019-03-22 16:25:24 +03:00
Mikhail Glukhikh e6bb920a1d FIR Java: support Kotlin extension overriding: at last, #KT-29937 Fixed 2019-03-14 18:18:40 +03:00
Mikhail Glukhikh d00d078b4f FIR Java: implement "appendErasedType" thus adding predefined signatures
Related to KT-29937
2019-03-14 18:18:20 +03:00
Mikhail Glukhikh f5e2cd2ac4 No override check in FirClassUseSiteScope, fix nasty substitution bug
This fixes MPP override test
(see mppFakeOverride in FirMultiModuleResolveTestGenerated)
2019-03-14 18:17:44 +03:00
Mikhail Glukhikh 6c12fabf74 FIR: make JavaClassEnhancementScope use-site, get rid of scope providers
Related to KT-29937
2019-03-14 18:09:41 +03:00
Mikhail Glukhikh be412baf9f FIR type enhancement: fold flexible types when it's possible
Related to KT-29937
2019-03-14 18:08:01 +03:00
Mikhail Glukhikh 6c8aba8039 FIR: support callable symbols in dependencies provider
This breaks mppFakeOverrides test because of bug in FIR fake overrides
2019-03-14 18:07:32 +03:00
Mikhail Glukhikh fb788dc4c0 Fix null Java type argument problem & add relevant test 2019-03-14 17:56:23 +03:00
Mikhail Glukhikh 6c79b184c0 FIR Java types: add Kotlin/Java mapping & mutability enhancements
Related to KT-29937
2019-03-14 17:55:10 +03:00
Mikhail Glukhikh f31faafd72 Introduce initial version of FIR Java type enhancement
Java type enhancement is performed by a special scope kind
Java FIR dump was added for multiplatform tests to look at enhancements
Overrides, J2K mapping, special cases does not work yet

Related to KT-29937
2019-03-14 17:51:00 +03:00
Denis Zharkov 92defc2ae3 Extract supertypes resolution into a separate FIR phase 2019-03-14 17:06:45 +03:00
Denis Zharkov 2dbe96c853 Extract ConeClassifierLookupTag (aka SearchSymbol)
So, for classifiers there are both Symbols and LookupTags
The difference between them is that the former are assumed to have
a reference to the actual FirDeclaration while LookupTags
effectively contain only classId and
something informative may only be obtained by FirSession

#KT-24075 Fixed
2019-03-05 18:23:17 +03:00
Mikhail Glukhikh f8e165dbe4 Integrate nullability into cone types, add & use FIR flexible type
FIR fake overrides are rendered now more precisely to test this process
2019-02-19 09:54:32 +03:00
Simon Ogorodnik 3a237416c9 Implement FIR loading for Java (classes, supertypes, parameters, funs)
Properties aren't implemented yet
FIR symbol provider functions return more specialized types now
Related to KT-28918, KT-29636, KT-29218

#KT-28788 Fixed
2019-02-19 09:54:20 +03:00
Simon Ogorodnik bd769f8fd7 Add multiplatform test with substitution, fix deep supertypes
This commit fixes ambiguity problems introduced before
in MPP tests with deep supertypes

#KT-29636 Fixed
2019-02-19 09:54:16 +03:00