Commit Graph

18688 Commits

Author SHA1 Message Date
Mikhail Zarechenskiy 9847278699 Report error about invalid if as expression on the if keyword
#KT-14633 Fixed
2017-06-22 14:18:11 +03:00
Mikhail Zarechenskiy e40c8fff05 Make resolution status name more precise 2017-06-22 13:50:01 +03:00
Mikhail Zarechenskiy 7a9e1b2b1d Improve diagnostic on overload resolution ambiguity
Report type mismatch on argument when a nullable argument is passed to non-null parameter.

 Note that this affects only functions with simple types without generics

 #KT-2007 Fixed
 #KT-9282 Fixed
2017-06-22 13:41:31 +03:00
Mikhail Zarechenskiy 4b3ffd9418 If all candidates are invisible then don't report ambiguity
#KT-10045 Fixed
2017-06-22 13:41:28 +03:00
Mikhail Zarechenskiy cd1ae7f0f2 Add resolution status to report about unsuccessful smartcast
#KT-10248 Fixed
 #KT-11119 Fixed
2017-06-22 13:41:27 +03:00
Mikhail Zarechenskiy 0f4497256b Report about wrong number of type arguments instead of ambiguity
#KT-7975 Fixed
 #KT-1809 Fixed
2017-06-22 13:05:10 +03:00
Dmitry Petrov 2b3043bf9f Fix CFG problem for 'when' in Konan
If type of 'when' expression is 'Nothing', it should be kept that way
even if the expression itself is implicitly coerced to Unit.
2017-06-22 10:21:54 +03:00
Alexander Udalov 1f34dfabd5 Use kotlin.Lazy for script definition computation, add test for no definition 2017-06-22 10:19:06 +03:00
Ilya Chernikov 4178188e15 Fix name retrieval on exception reporting during analysis 2017-06-22 10:19:05 +03:00
Alexander Udalov 135f0a136e CLI: report error if the first argument for "-script" is not kts
#KT-3045 Fixed
2017-06-22 10:19:05 +03:00
Alexander Udalov 233b63469a Fix IllegalAccessException on private annotation in reflection
#KT-14094 Fixed
2017-06-21 15:43:00 +03:00
Alexander Udalov 6388c1885c Fix KCallable.call for protected members from base class
Class.getMethod does not return protected methods from super class, so
we invoke getDeclaredMethod on each super class manually instead

 #KT-18480 Fixed
2017-06-21 15:42:59 +03:00
Alexander Udalov a25aa2fed8 Cleanup DefaultErrorMessagesJvm
Use static imports, use Kotlin stdlib API, use more precise renderers
2017-06-21 15:42:59 +03:00
Alexander Udalov aed5b934f8 Introduce KotlinBuiltIns.isUnderKotlinPackage
Semantics is the same as in the former
FunctionDescriptor.hasSubpackageOfKotlin, but it doesn't compute the FQ
name of the descriptor
2017-06-21 15:42:57 +03:00
Mikhail Zarechenskiy 1e020644e1 Fix getting right bracket element for collection literal 2017-06-21 01:22:08 +03:00
Mikhail Zarechenskiy 837df66c19 Register reference contributor for collection literals
#KT-18551 Fixed
2017-06-21 00:16:28 +03:00
Alexey Andreev 78b238a05b Report warning when two .kt files get same paths in JS source map 2017-06-20 17:40:36 +03:00
Alexey Andreev 60dd475493 Don't expose sourceMapSourceRoots argument to Gradle (JS)
Exposing this property causes IDEA to treat it as a free
command line argument, which is undesirable.
Support source roots via setting command line arguments inside
JS gradle task.
2017-06-20 17:40:35 +03:00
Alexey Andreev 13ab63ae09 Generate relative paths in JS source maps
Also, add CLI options to manipulate prefixes of path

See KT-4078
2017-06-20 17:40:32 +03:00
Alexander Udalov 8ef3531c48 Add kotlin.Any to KClass.superclasses if it's absent
#KT-18476 Fixed
2017-06-20 14:39:48 +03:00
Alexander Udalov 9471f33c38 Refactor getDefaultSupertype, drop obsolete diagnostic 2017-06-20 14:39:47 +03:00
Alexander Udalov 90f2ea87a6 Fix exception on callBy of callable with more than 32 parameters
The previous condition that checked if we'd skipped any optional
parameters didn't work when number of parameters > 32 because the number
of bit masks in that case was more than one

 #KT-18404 Fixed
2017-06-20 14:39:47 +03:00
Mikhael Bogdanov 62cd57b0d2 Make base test classes 'abstract' 2017-06-20 13:07:30 +02:00
Dmitry Petrov 786ac46fa6 Do not store nulls for captured variables going out of scope
These values can't be read after going out of scope.
JVM implementation can take care of such object references on its own.
Ref objects for captured variables are not different from any other
objects stored in local variables, so there's really no reason to
nullify these references explicitly.

 #KT-18478 Fixed Target versions 1.1.4
2017-06-20 13:31:36 +03:00
Dmitry Petrov 9356c1e0ef Skip PopBackwardPropagation for methods with large frames or no POPs
TODO get rid of SourceInterpreter here, it's quite expensive.
2017-06-20 13:31:36 +03:00
Dmitry Petrov 0a622e4440 Rewrite OtherOrigin overloads to prevent further silly problems
#KT-18413 Fixed Target versions 1.1.4
2017-06-20 13:31:36 +03:00
Mikhael Bogdanov 8ca82c8e99 Add missed common parts 2017-06-20 11:08:53 +02:00
Mikhael Bogdanov 956cc0dbfd Support IMPLICIT_INTEGER_COERCION 2017-06-20 11:01:10 +02:00
Mikhael Bogdanov d888addba0 Add KCallableNamePropertyLowering 2017-06-20 11:00:38 +02:00
Mikhael Bogdanov 44b7f5a5be Add inline tests to IR 2017-06-20 10:26:38 +02:00
Mikhael Bogdanov 8ab705a14c Introduce IrInliner 2017-06-20 10:26:37 +02:00
Mikhael Bogdanov 9f736f2192 Extract PsiSourceCompiler 2017-06-20 10:26:36 +02:00
Mikhael Bogdanov 2507780e19 Extract PsiInlineCodegen 2017-06-20 10:26:35 +02:00
Mikhael Bogdanov 8dc1b8f95f Introduce BaseExpressionCodegen and SourceCompilerForInline,
switch CallGenerator and InlineCodegen to them

~base
2017-06-20 10:26:35 +02:00
Alexey Andreev d3a5201ecc Intrinsify String?.plus in JS BE
See KT-8020
2017-06-20 10:40:21 +03:00
Yan Zhulanow d07fd52c43 SamWithReceiver: Add general-purpose plugin and Gradle/Maven integrations 2017-06-19 20:28:47 +03:00
Mikhail Zarechenskiy b53a3b324f Fix 'infix call' diagnostic for in operation
#KT-8845 Fixed
2017-06-19 17:36:08 +03:00
Mikhail Zarechenskiy d17f31c8b0 Refactoring: move several utils from js module to frontend 2017-06-19 17:36:07 +03:00
Mikhail Zarechenskiy dbfea9b787 Fix TCE for invalid code with wrong callee expression
#KT-14927 Fixed
2017-06-19 17:36:06 +03:00
Mikhail Zarechenskiy 011231f2ab Collect sam adapters for constructors in synthetic scope
Also place computation of synthetic constructors under one function
2017-06-16 16:44:52 +03:00
Derek Alexander 1f5cc059f9 Fix compiler failure related NO_EXPECTED_TYPE
Changes to turn KT-16016 into a compiler diagnostic error rather than a
stack trace

#KT-16016 Fixed
2017-06-16 15:52:09 +03:00
Dimach d369fa094a Add Boolean? == const to elvis conversion and vice versa #KT-15368 Fixed
Convert elvis to equality check implemented as inspection due
code style guide
2017-06-15 15:01:39 +03:00
Pavel V. Talanov 46512f34e4 Fix 'Find symbol' and 'Go to declaration' when jar is used in many libs
SourceNavigationHelper takes into account all the module infos
    that given virtual file is a part of

 #KT-15093 Fixed
2017-06-15 13:35:40 +03:00
Nikolay Krasko 6d7ce6cec1 Prevent debugger to stop twice on breakpoints after suspension point
#KT-18453 In Progress
2017-06-15 13:29:26 +03:00
Nikolay Krasko 49baba017a Allow to stop in suspend funciton on enter and before suspended return
This commit is needed to implement "step over" action over suspended
call. Debugger have to understand when function is going to be
suspended and be able to set a breakpoint on function re-enter.

 #KT-18453 In Progress
2017-06-15 13:29:25 +03:00
Mikhael Bogdanov c4fc0f3808 Review fixes 2017-06-14 10:34:25 +02:00
Mikhael Bogdanov 724ac3cf59 Convert text util methods to extension properties 2017-06-14 10:34:24 +02:00
Mikhael Bogdanov e96d2212da Workaround for LightClass generation problem KT-18419 2017-06-14 10:34:24 +02:00
Mikhael Bogdanov c8d3553a31 Rename InlineCodegenUtil.kt to inlineCodegenUtils.kt 2017-06-14 10:34:23 +02:00
Mikhael Bogdanov bbb2b36794 Merge InlineCodegeUtil and InlineCodegeUtils 2017-06-14 10:34:22 +02:00