Commit Graph

840 Commits

Author SHA1 Message Date
Dmitriy Novozhilov a022f85776 [FIR] Minor. Add @BaseTransformedType to FirWhenBranch 2019-08-22 10:55:07 +03:00
Dmitriy Novozhilov f877fe40b3 [FIR] Fix expected type in invoke completion 2019-08-22 10:55:07 +03:00
Dmitriy Novozhilov 57a2665b00 [FIR] Update tests for previous commit 2019-08-22 10:55:07 +03:00
Dmitriy Novozhilov e48959350c [FIR] Infer type of when expressions and try expressions like it is function call 2019-08-22 10:55:07 +03:00
Dmitriy Novozhilov 741ff958e8 [FIR] Add util function for extracting return arguments from block 2019-08-22 10:55:07 +03:00
Dmitriy Novozhilov fe3824d796 [FIR] Introduce FirResolvable
FirResolvable is an interface representates fir node wit calleeReference
It will be useful for infer `try` and `when` expressions as function call
2019-08-22 10:55:07 +03:00
Dmitriy Novozhilov beeba23cf0 [FIR] Minor. Wrap withScopeCleanup with try-finally 2019-08-22 10:55:07 +03:00
Dmitriy Novozhilov e944119f71 [FIR] Don't use implicit type as expected type of anonymous function 2019-08-22 10:55:07 +03:00
Dmitriy Novozhilov 7861396246 [FIR] Add util function for creating functional cone type 2019-08-22 10:55:07 +03:00
Dmitriy Novozhilov 637fb55a7b [FIR] Add implementation of intersection types to Fir type system 2019-08-22 10:55:07 +03:00
Dmitriy Novozhilov 1708a34eb8 [FIR] Fix incorrect findCommonIntegerLiteralTypesSuperType dummy implementation 2019-08-22 10:55:07 +03:00
Dmitriy Novozhilov e6bf3b3263 [FIR] Render nullability in type renderer, not in fir renderer 2019-08-22 10:55:07 +03:00
Dmitriy Novozhilov 3e44bc805f [FIR] Return error type from common super type if it present 2019-08-22 10:55:07 +03:00
Dmitriy Novozhilov 6e2958880b [FIR] Add forgotten replacing arguments in abbreviated type expansion 2019-08-22 10:55:07 +03:00
Dmitriy Novozhilov 317e3edba8 [FIR] Add default upper bound to type parameter in fir deserializer 2019-08-22 10:55:07 +03:00
Ilya Chernikov 315a9d66a0 Refactor more tasks to lazy API 2019-08-21 20:20:08 +02:00
Mikhail Zarechenskiy d59b910403 Add tests for obsolete issues
#KT-32207 Obsolete
 #KT-32836 Obsolete
 #KT-32949 Obsolete
 #KT-9384 Obsolete
2019-08-15 13:01:39 +03:00
Mikhail Zarechenskiy 1969ad6e9d [NI] Take into account use-site variance for constraint from LHS of CR
#KT-32851 Fixed
2019-08-15 13:01:38 +03:00
Dmitry Petrov 986654b709 psi2ir: fix unsubstituted type parameters around SAM conversions
Preserve type substitution:
- when obtaining function type for SAM type;
- when generating SAM conversions for SAM adapter arguments;
- for "original" method corresponding to a SAM adapter.
2019-08-14 14:18:42 +03:00
Dmitriy Novozhilov c3ea0a1e5b [FIR] Add forgotten visit of annotation for FirAbstractLoop 2019-08-08 15:47:24 +03:00
Mikhail Zarechenskiy 04e57f712e [NI] Introduce feature for passing function references with defaults
Relates to KT-8834, we continue reducing differences between old and new
 inference. Note that as for `SamConversionPerArgument`, this feature
 is enabled in the compiler and not in the IDE to avoid breaking code
 for those users that already enabled new inference in the compiler
2019-08-07 15:58:36 +03:00
Mikhail Zarechenskiy 0219b86d06 [NI] Fix poor performance of recursive types approximation
#KT-32407 Fixed
2019-08-07 15:21:16 +03:00
Dmitry Petrov 48ae76ac28 IR: Introduce IrTypeAlias element 2019-08-06 12:42:02 +03:00
Simon Ogorodnik 7c24ad39ea Remove fir:lightTree test on kotlinx.coroutines as it caused problems in IDEA 2019-08-02 17:33:29 +03:00
Ivan Cilcic 00f880a5a0 Make all necessary refactoring after merge
1) Removed all unnecessary sessions
2) Added delegation converter
3) Moved property accessor initialization to apply block instead of constructor
4) Removed unnecessary AnotationContainer class
2019-08-01 15:14:29 +03:00
Ivan Cilcic f3a7db2428 Add auto test in gradle (light tree)
Additionally removed benchmarks from auto test because they require manual setting.
Instruction was also added.
2019-08-01 15:14:29 +03:00
Ivan Cilcic 2ca7978544 Remove duplicate code from convertIsExpresion and convertBinaryWithType 2019-08-01 15:14:29 +03:00
Ivan Cilcic d03b6cc014 Remove extra test methods (light tree) 2019-08-01 15:14:29 +03:00
Ivan Cilcic 250d86b692 Rename "MyKotlinParser" to "KotlinLightParser" 2019-08-01 15:14:28 +03:00
Ivan Cilcic 2e05fe9976 Remove extra method toFirExpression 2019-08-01 15:14:28 +03:00
Ivan Cilcic f3299c4636 Delete extra files with util methods (raw FIR) 2019-08-01 15:14:28 +03:00
Ivan Cilcic 01daa90f5c Extract bangbang and bindLabel methods (raw FIR) 2019-08-01 15:14:28 +03:00
Ivan Cilcic c5547a2229 Extract some information to separate Context class 2019-08-01 15:14:28 +03:00
Ivan Cilcic cad0dbf087 Rewrite RawFirBuilder and its utils to be able to reuse it in LightTree converter 2019-08-01 15:14:27 +03:00
Ivan Cilcic 084bad4c25 Fix bug in import directives converter (light tree to FIR) 2019-08-01 15:14:27 +03:00
Ivan Cilcic 1af7063a47 Made primary constructor wrapper to avoid recreating value parameter instances 2019-08-01 15:14:27 +03:00
Ivan Cilcic 2a60f95a32 Add FIR session argument to LightTree2Fir constructor 2019-08-01 15:14:27 +03:00
Ivan Cilcic c253ff7953 Write syntactically incorrect constructions processing (light tree to FIR) 2019-08-01 15:14:26 +03:00
Ivan Cilcic ef535a2d85 Resolve converter errors after merge (light tree to FIR) 2019-08-01 15:14:26 +03:00
Ivan Cilcic 86097bdcce Write method to test data from diagnostic test folder (light tree) 2019-08-01 15:14:26 +03:00
Ivan Cilcic b5293e7df7 Edit light tree to FIR benchmarks to support off stub mode 2019-08-01 15:14:26 +03:00
Ivan Cilcic c8c37fd86e Move object literal parsing, rewrite the determination that member is local 2019-08-01 15:14:26 +03:00
Ivan Cilcic 531ee03a92 Write if and when parsing (light tree to FIR) 2019-08-01 15:14:25 +03:00
Ivan Cilcic b7d57690c5 Write try expression parsing (light tree to FIR) 2019-08-01 15:14:25 +03:00
Ivan Cilcic a0e79449fd Write throw expression parsing (light tree to FIR) 2019-08-01 15:14:25 +03:00
Ivan Cilcic a714515527 Write break and continue parsing (light tree to FIR) 2019-08-01 15:14:25 +03:00
Ivan Cilcic e0a92c5ed5 Write local variable parsing (light tree to FIR) 2019-08-01 15:14:25 +03:00
Ivan Cilcic c0fdbec358 Write loops parsing (light tree to FIR) 2019-08-01 15:14:24 +03:00
Ivan Cilcic 26290746f3 Write object literal parsing (light tree to FIR) 2019-08-01 15:14:24 +03:00
Ivan Cilcic 8dd72a5cf2 Write lambda expressions and local members parsing (light tree to FIR) 2019-08-01 15:14:24 +03:00