Commit Graph

60 Commits

Author SHA1 Message Date
rapturemain 4e577caa99 [FIR] Support for EXPOSED_FUNCTION_RETURN_TYPE 2020-04-20 17:25:25 +03:00
rapturemain 15d4891c92 [FIR} Test data for EXPOSED_PROPERTY_TYPE 2020-04-20 17:25:24 +03:00
rapturemain cc86767a23 [FIR] Support for EXPOSED_TYPEALIAS_EXPANDED_TYPE 2020-04-20 17:25:24 +03:00
Mikhail Glukhikh fe02c2bab3 FIR: return Unit from empty lambda 2020-04-20 17:05:34 +03:00
Dmitriy Novozhilov f489e4044f [FIR-TEST] Update testdata after removal bodies of synthetic data class funs 2020-04-17 13:22:19 +03:00
Dmitriy Novozhilov 7f02d57d88 [FIR] Correctly detect super type in delegated constructor call 2020-04-17 12:37:29 +03:00
Juan Chen a1e0e8b0e7 [FIR] Handle receiver types of extension methods when computing maximally specific types.
Test case (from testPrimitiveReceiver):

fun Short.foo() = 3
fun Int.foo() = 4

1::foo
2020-04-15 11:16:33 +03:00
Dmitriy Novozhilov f7dc06a772 [FIR] Approximate integer constants in lhs of callable reference 2020-04-15 11:13:01 +03:00
Dmitriy Novozhilov c71f9d9640 [FIR] Use argument mapping from resolved call for contract argument mapping 2020-04-15 11:13:01 +03:00
Dmitriy Novozhilov a01bbbb0a0 [FIR] Add processing conditional contracts on property accessors 2020-04-15 11:13:00 +03:00
Dmitriy Novozhilov 1074e4bf29 [FIR] Add contracts resolve for property accessors 2020-04-15 11:13:00 +03:00
Dmitriy Novozhilov d808f3e4fb [FIR-TEST] Add tests for contracts resolve 2020-04-15 11:12:59 +03:00
Dmitriy Novozhilov 3c33ee9c68 [FIR-TEST] Move existing contract tests to fromLibrary directory 2020-04-15 11:12:58 +03:00
Jinseong Jeon 08b91da6db FIR: fix body generation for data class's copy method 2020-04-14 11:51:30 +03:00
simon.ogorodnik af27ca013b [FIR] Fix captured type parameters propagation in deserialization 2020-04-13 20:26:19 +03:00
simon.ogorodnik 132c8ee210 [FIR] Apply GOOD testData changes after type parameters support 2020-04-13 20:26:18 +03:00
simon.ogorodnik 21ede8b745 [FIR] Add test for inner class type parameter capturing 2020-04-13 20:26:17 +03:00
Mikhail Glukhikh a93c7a39e0 [FIR] Provide object [dispatch] && callable reference receivers properly 2020-04-09 15:22:56 +03:00
Mikhail Glukhikh 14731527ed [FIR] Don't store class functions in local scope 2020-04-09 15:22:55 +03:00
Dmitriy Novozhilov 8a2b39d647 [FIR] Add checking receivers of callable references 2020-04-08 10:38:45 +03:00
Denis Zharkov 65e90743df FIR: Fix hanging inference case with intersection types 2020-04-07 17:54:55 +03:00
Denis Zharkov 81d9cf76f2 FIR: Add java.io.Serializable as supertypes to built-in classes 2020-04-07 17:54:55 +03:00
Denis Zharkov 168c7f306f FIR: Fix ambiguity for invoke candidates on qualifier receiver 2020-04-07 17:54:55 +03:00
Denis Zharkov 4cd93a9fec FIR: Add test for discrepancy in call resolution for qualifiers with old FE
^KT-38031 Open
2020-04-07 17:54:55 +03:00
Mikhail Glukhikh 32748ea741 [FIR] Change char constant rendering to prevent encoding inconsistencies 2020-04-06 16:41:58 +03:00
Mikhail Glukhikh d7460d47de [FIR] Generate dispatch & extension receivers for variable assignments 2020-04-03 17:21:21 +03:00
Mikhail Glukhikh f3f7bf70f6 [FIR] Set delegate field receiver properly 2020-04-03 13:29:55 +03:00
Mikhail Glukhikh 036b6c63f6 [FIR] During resolve, set correctly property reference type in delegate 2020-04-03 13:18:47 +03:00
Dmitriy Novozhilov 7dd91df10b [FIR] Don't analyze with DFA already analyzed classes 2020-04-03 10:08:26 +03:00
Dmitriy Novozhilov 20d0e8647d [FIR] Pass data flow to init blocks of local classes 2020-04-03 10:08:25 +03:00
Dmitriy Novozhilov bcd2e5ed2c [FIR] Add control flow graph to inplace lambdas 2020-04-03 10:08:24 +03:00
Dmitriy Novozhilov 1d39270b3e [FIR] Don't pass data flow to property accessors of non local classes 2020-04-03 10:08:24 +03:00
Dmitriy Novozhilov 1d1b8d3290 [FIR-TEST] Update cfg dumps according to previous commits 2020-04-03 10:08:23 +03:00
Dmitriy Novozhilov b90c8eb8ed [FIR] Analyze annotations of local class before class itself 2020-04-03 10:08:20 +03:00
Dmitriy Novozhilov 43e9cbbbf5 [FIR] Add parent graph to CFG 2020-04-03 10:08:18 +03:00
Dmitriy Novozhilov 8cb6e8f8af [FIR] Add control flow graph for class initialization 2020-04-03 10:08:17 +03:00
Dmitriy Novozhilov 74d86d82c6 [FIR] Add control flow graph to FirAnonymousInitializer 2020-04-03 10:08:16 +03:00
Denis Zharkov 6cc6b9efcb FIR: Fix overload resolution for some invoke cases
Namely, it's about the cases when there are multiple variable candidates
with the same priority and all of them should be collected and compared
2020-04-02 12:10:50 +03:00
Denis Zharkov 9abe669443 FIR: Fix resolution for invokes on class qualifiers 2020-04-02 12:10:50 +03:00
Ilya Gorbunov 427750ba03 Update builtins test data 2020-04-01 08:06:57 +03:00
Mikhail Glukhikh d8bc29e6c6 [FIR] Eliminate obsolete NO_SUPERTYPE diagnostic from builder 2020-03-27 18:24:50 +03:00
Nick b38d30bab0 [FIR] Support several super-related diagnostics 2020-03-27 18:24:50 +03:00
Mikhail Glukhikh b27152f903 Replace some FIR syntax errors with more proper diagnostics 2020-03-27 16:46:59 +03:00
FenstonSingel b7d8e879a6 [FIR] Support 4 diagnostics for pairs of modifiers
In particular, this commit includes:
* Attempt to abstract access to FirSourceElement via FirModifier
* Add more visit functions to DeclarationCheckersDiagnosticComponent
* Add messages+factories for 4 modifier-related errors and warnings
* Introduce FirModifierChecker
2020-03-27 12:34:29 +03:00
Dmitriy Novozhilov 48fb279721 [FIR] Add constraint to flexible type for declared argument for java parameter 2020-03-27 10:17:12 +03:00
Dmitriy Novozhilov 3acb64c536 [FIR] Add flexible default upper bound for java type parameters 2020-03-27 10:17:12 +03:00
Denis Zharkov 5539ad8ce8 FIR: Fix data-flow for jumps between members of local classes
First of all, note that currently ControlFlowGraphBuilder instance is fully mutable
and shared between all local classes and top-level classes in the same thread

Before this change, previous node for member of local class
was defined as lastNode

And in the case of implicit types, lastNode might be in a middle of another
local class member that is being resolved right now.

See the test:
- "a.length" expression in `bar` should be resolved because smart cast happens
before the class declaration
- "b.length" expression in `bar` should be unresolved because smart cast happens
in a different function

The latter case has been working incorrectly, the call was errorenously
resolved because "lastNode" were pointed just before "bar()" call in "foo"
2020-03-25 15:36:19 +03:00
Denis Zharkov d869ae7826 FIR: Make resolution logic for local classes the same as for top-level
Run different phases through common transformers sequentially
It should make code more reusable and may help with avoid common bugs
2020-03-25 15:36:17 +03:00
Denis Zharkov cdd7e41891 FIR: Support proper implicit return type computation for local classes 2020-03-25 14:53:34 +03:00
simon.ogorodnik 5a3eefcba1 [FIR] Fix suspend functional type deserialization 2020-03-24 18:58:17 +03:00