Commit Graph

145 Commits

Author SHA1 Message Date
Mikhael Bogdanov 3384c6f603 Updated test data 2016-12-30 10:19:57 +01:00
Mikhael Bogdanov e775cc697e Fix for KT-15447: Compiler backend error: "Don't know how to generate outer expression for class"
#KT-15447 Fixed
2016-12-29 16:57:03 +01:00
Alexey Andreev 07de819377 Regenerate tests and test data 2016-12-29 16:15:49 +03:00
Alexey Andreev 175d37fdc8 JS: add test to prove that KT-13523 is no more reproducible 2016-12-29 16:00:54 +03:00
Alexey Andreev 27c2a4f6a8 JS: disable mangling for PublishedApi. Export declarations marked with PublishedApi. See KT-15442 2016-12-29 16:00:51 +03:00
Yan Zhulanow 5844f3cf1b Kapt3: Write stub class files with metadata (needed for incremental compilation) 2016-12-28 22:28:30 +03:00
Alexander Udalov 73845bfc27 Fix light-analysis test data 2016-12-27 18:19:49 +03:00
Mikhael Bogdanov 4c9bac084c Fix for KT-15437: VerifyError: Bad local variable type on simplest provideDelegate
#KT-15437 Fixed
2016-12-27 14:07:37 +01:00
Mikhael Bogdanov f1c1fcf0fc Fix for KT-11969: ProGuard issue with private interface methods
#KT-11969 Fixed
2016-12-27 14:07:37 +01:00
Alexander Udalov f8a88bdffb Fix "Rewrite at slice LEXICAL_SCOPE" for callable references
For special calls (when-expressions, if-expressions, etc.), do not attempt to
get type of the argument expression, which is the block with the callable
reference, instead get type of the callable reference itself. The difference
matters because for block expressions, a new lexical scope is created for each
getTypeInfo (see ExpressionTypingServices.getBlockReturnedType), and we do not
support rewrites of this value in the binding trace

 #KT-12044 Fixed
2016-12-27 10:45:46 +03:00
Mikhail Zarechenskiy 38a2518498 Fix computation of erased receiver for intersection types
#KT-9630 Fixed
2016-12-26 22:34:40 +03:00
Alexander Udalov cf2839a088 Fix light-analysis test data 2016-12-24 14:37:24 +03:00
Alexander Udalov 5402d50ea3 Light analysis tests: do not render empty lines between classes and in the beginning 2016-12-23 22:30:48 +03:00
Alexey Andreev 1ecd957981 JS: fix translation of delegated constructor call from secondary constructor when argument is a complex expression which translates to multiple statements. See KT-15357 2016-12-22 17:19:24 +03:00
Alexey Andreev cef32b3327 JS: initialize fields of coroutine state machine with undefined value so that they match local variable semantics. Fix KT-15366 2016-12-22 17:19:23 +03:00
Mikhael Bogdanov ef825a7559 Fix for KT-14868: CCE in runtime while converting Number to Char
#KT-14868 Fixed
2016-12-22 09:44:24 +01:00
Denis Zharkov 8475869fb3 Support common calls on suspend function typed values
Also support multiple value parameters in suspend function type

 #KT-15379 Fixed
 #KT-15380 Fixed
2016-12-22 11:15:52 +03:00
Alexey Andreev f42a15bc4f Fix test data for light analysis test 2016-12-21 17:31:29 +03:00
Dmitry Petrov 8fe9de1d35 Generate toArray methods defined in classes inherited from collections as public even if they are declared with different visibility in Kotlin. 2016-12-21 10:50:17 +03:00
Ilya Gorbunov 10f8e70322 Rename ClosedComparableRange to ClosedFloatingPointRange 2016-12-19 18:36:52 +03:00
Denis Zharkov a1ac77d382 Support async iterator case with coroutines
Not all the `hasNext` operators return types is exactly Z,
suspend operators return boxed versions.

So the fix is just coercing result value after invoked function to Z
2016-12-19 11:07:33 +03:00
Denis Zharkov 5dbc04abbb Refine returns codegen for suspend functions
This change should make the logic a bit more simple.
For all suspend functions/coroutines treat them in expression codegen
like they return boxed version of the original type.

Everything works fine then, except Unit type functions:
their bodies must be generated just like they're VOID and then load
Unit on stack manually.
2016-12-19 11:07:32 +03:00
Alexander Udalov 49de52e7ef Fix kotlinFunction for inline reified methods in reflection
Inline functions with reified type parameters are generated as private (see
AsmUtil.specialCaseVisibility), so we should treat them as "declared" in
reflection to look them up via getDeclaredMethod, not getMethod

 #KT-14721 Fixed
2016-12-16 13:12:41 +03:00
Stanislav Erokhin d7566d84d0 Fixed testdata. 2016-12-16 02:01:12 +03:00
Stanislav Erokhin b527a4d158 Global rename in test data for coroutines
(cherry picked from commit 132f97b)
2016-12-15 23:58:26 +03:00
Dmitry Petrov 9fd1ac72a9 Purge remaining traces of @AllowSuspendExtensions. 2016-12-15 23:58:19 +03:00
Denis Zharkov 7ffefb515f Update test data for LightAnalysis/Coroutines 2016-12-15 23:57:58 +03:00
Alexey Andreev b50bfaf071 JS: add test to prove that KT-14419 is not more reproducible. Add test to prove that extension delegate with extension getValue is translated correctly. 2016-12-15 19:05:33 +03:00
Anton Bannykh 1957ac347a JS: make enum valueOf() throw if not found. 2016-12-15 17:58:40 +03:00
Mikhail Zarechenskiy 5a829809d9 Add operator 'rem' as extension to BigInteger
#KT-14650 Fixed

 Note that after this change behaviour of '%' on BigInteger is changed,
now it works like a proper remainder
2016-12-14 15:29:00 +03:00
Alexey Andreev d9cf15a665 JS: deparenthesize LHS of assignment before choosing appropriate AccessTranslator. Fix KT-15169 2016-12-13 14:05:25 +03:00
Stanislav Erokhin 9dc9fb578f Rename toDelegateFor to provideDelegate. 2016-12-12 23:14:07 +03:00
Mikhael Bogdanov 937a933150 Support local 'toDelegatedFor' properties 2016-12-12 23:14:02 +03:00
Mikhael Bogdanov c5e14a2059 Some new tests for 'toDelegateFor' 2016-12-12 23:14:01 +03:00
Dmitry Petrov 97d5bbf1c2 toDelegateFor: JVM BE implementation 2016-12-12 23:13:59 +03:00
Dmitry Petrov 5ddf8e60e6 Use delegate initializer expression resolution scope for 'toDelegateFor' resolution. 2016-12-12 23:13:57 +03:00
Ilya Gorbunov b3b2a5eb91 Update ranges codegen light-analysis testData. 2016-12-11 21:26:06 +03:00
Yan Zhulanow 2f50bd8c80 Minor: Fix light analysis tests (rebase to master) 2016-12-11 21:03:05 +03:00
Mikhail Zarechenskiy 97ca51381a Gradual migration of operator 'mod' to 'rem'
- Introduce new 'rem' operator convention
 - Prefer 'rem()' to 'mod()' when both are available, even if mod() is a
   member, and rem() -- an extension
 - Place operator 'rem' under the language feature
2016-12-09 16:43:35 +03:00
Mikhael Bogdanov 18cb734c58 Do not mangle internal @PublishedApi functions 2016-12-09 11:55:16 +01:00
Mikhael Bogdanov 627dd66ed5 New ieee754 arithmetic, Fix for KT-14651: Floating point comparisons shall operate according to IEEE754 2016-12-09 09:48:46 +01:00
Alexander Udalov c811c1bea5 Reflection: add KAnnotatedElement.findAnnotation
#KT-12250 Fixed
2016-12-07 21:45:24 +03:00
Yan Zhulanow fcafaf5500 Update LightAnalysisModeCodegenTests for Kotlin 1.1 2016-12-05 20:10:32 +03:00
Yan Zhulanow 75aaf6e797 Minor: Update tests for light analysis mode (rebase) 2016-12-05 19:58:02 +03:00
Yan Zhulanow 328286ab14 Use box tests to check if the light analysis mode (without analyzing bodies when possible) produces the same result as the complete analysis. See also the next commit in which light analysis mode is applied. Note that no tests were changed. 2016-12-05 19:57:47 +03:00