Commit Graph

48613 Commits

Author SHA1 Message Date
Mikhail Glukhikh caee77cdae Kotlinize findOrCreateDirectoryForPackage in create actual fix
Before this commit, without existing directory
we tried to create it only inside Java source roots,
which is incorrect for JS and other non-JVM modules.
Source roots themselves still aren't created if they don't exist.

This fixes KT-19586 partially
2018-09-05 17:21:10 +03:00
Yan Zhulanow 3276e348cc Fix kapt tests (Kotlin version updated to 1.3) 2018-09-05 17:15:04 +03:00
Yan Zhulanow 17849473d6 Fix bunch compilation for AS 3.1/3.2 2018-09-05 17:15:04 +03:00
Dmitry Savvinov 051ad0f79e Fix unsound smartcast due to returns(null) in safecall
^KT-26382 Fixed
2018-09-05 16:27:48 +03:00
Dmitry Savvinov 18338f4ea3 Add test on safecall of function with returns(null) contract
Currently with non-desired testdata, fix incoming in the next commit.
2018-09-05 16:27:47 +03:00
Mikhail Glukhikh 1530a8bf53 Downgrade "Call chain -> sequence" to information level
Made to hide problem KT-26571
2018-09-05 14:55:23 +03:00
Roman Elizarov eac1f5f8c8 Bootstrap change to rename SuccessOrFailure to Result 2018-09-05 14:29:36 +03:00
victor.petukhov af732d16d6 Actualize contracts diagnostic spec tests 2018-09-05 14:08:50 +03:00
Mikhail Glukhikh bae92f3a33 Sealed class: handle the case with actual type alias #KT-26141 Fixed
Before this commit, class super-type could be sealed only in the case
it's the class we are inside or in the same file with.
However, it's quite possible for the expect sealed class
to be implemented by typealias.
So in this commit we allow class super-type to be sealed
if it's typealias expansion we are inside.
2018-09-05 13:25:49 +03:00
Mikhail Glukhikh 56d89266d4 Add tests for KT-26141 (yet without changes) 2018-09-05 13:10:03 +03:00
Mikhail Glukhikh 68e3821ae2 Code cleanup: packageUtils.kt 2018-09-05 13:05:08 +03:00
Mikhail Glukhikh 53e7778078 Add modifiers on the same line even after annotation #KT-26492 Fixed 2018-09-05 13:05:08 +03:00
Mikhail Glukhikh 4dd95e5640 Introduce OptionalExpectationInspection
It works at INFORMATION level only and is intended to form quick-fixes
to add relevant actual declarations.

#KT-25533 Fixed
2018-09-05 13:05:07 +03:00
Mikhail Glukhikh ba84c6adf3 Request focus while navigating to expected declaration #KT-18490 Fixed 2018-09-05 13:05:07 +03:00
Mikhail Glukhikh df125702c1 Test for KT-25040 (just to stabilize behaviour) 2018-09-05 13:05:07 +03:00
Mikhail Glukhikh 69def648c9 Remove deprecated MP extensions from Gradle menu #KT-22491 Fixed
Related to KT-26414
2018-09-05 13:05:06 +03:00
Mikhail Glukhikh 62e1121e7f Remove deprecated MP project builder from Gradle menu #KT-26414 Fixed 2018-09-05 13:05:06 +03:00
Dmitry Petrov db13ab59a6 Test: SuccessOrFailure calls don't generate erased class references 2018-09-05 12:20:57 +03:00
Dmitry Petrov 203fd6a5d6 Make inline class wrapper constructor synthetic 2018-09-05 12:20:57 +03:00
Dmitry Petrov 85826d304e Don't generate secondary constructors for inline class wrapper 2018-09-05 12:20:57 +03:00
Dmitry Petrov 65881dda97 Fix tests after rebase 2018-09-05 12:20:57 +03:00
Dmitry Petrov 1bf8cfca8b Test: property accessors are called by inline class 2018-09-05 12:20:57 +03:00
Dmitry Petrov a2900282fd Call factory method for primary constructors of inner classes
We might want to add 'init' blocks later, so now, for the sake of
binary compatibility with 1.3-RC binaries, we have to generate these
'constructor' calls.

Note that in some tests inline class boxing is no longer redundant,
because resulting value is passed to 'constructor' as an argument.
2018-09-05 12:20:57 +03:00
Dmitry Petrov b1016936b2 'box'/'unbox' methods are called by inline class 2018-09-05 12:20:57 +03:00
Dmitry Petrov 580b782585 Simplify code, make $Erased class package private 2018-09-05 12:20:57 +03:00
Dmitry Petrov 687b492bf9 Test: inline class secondary constructors are called by inline class 2018-09-05 12:20:57 +03:00
Dmitry Petrov 05daa21657 Fix inline class secondary constructor call generation
Don't generate NEW+DUP for inline class constructor calls.
2018-09-05 12:20:57 +03:00
Dmitry Petrov 80a67477db Generate method calls for inline classes through IC, not IC$Erased
IC extends IC$Erased, so it should be fine.
2018-09-05 12:20:57 +03:00
Dmitry Petrov 3080b65f7d Inline (wrapper) class IC extends erased inline class IC$Erased 2018-09-05 12:20:57 +03:00
Sergey Bogolepov a46b28718e Add allScopes property to IrElementVisitorVoidWithContext 2018-09-05 09:56:48 +03:00
Svyatoslav Scherbina 66b259350a Support implicit integer coercion enabling for the entire module 2018-09-05 09:56:47 +03:00
Nicolay Mitropolsky d0575127be fix for StoredExceptionsThrowToggleAction nullability changed in 183 2018-09-05 09:42:59 +03:00
Roman Elizarov 0401b4e0bb Coroutine context shall perform structural equality comparison on keys
Fixes KT-26398
2018-09-05 01:29:19 +03:00
Ilmir Usmanov cfc10ec061 Simplify debug metadata: instead of array of same values, store single element
This change is valid, since we want StackTraceElement to be as close
as possible to StackTraceElement of non-coroutine code.
Particularly, if the line is inside inlined function, its className,
functionName and sourceFile are inline site's ones, but lineNumber
is large, which is the way of representing inline function's line
numbers. The rest is handled by the plugin, which allows the user to choose
between inline function body and inline site.
2018-09-04 22:20:08 +03:00
Svyatoslav Kuzmich ad58fdd158 [JS IR BE] Unmute tests after adding stdlib 2018-09-04 20:19:04 +03:00
Svyatoslav Kuzmich 197a5969e2 [JS IR BE] Fix stdlib files list for 1.3 2018-09-04 20:19:04 +03:00
Svyatoslav Kuzmich c3b9a5108e [JS IR BE] Add more stdlib files to runtime
Keep old sources list for coroutine tests
2018-09-04 20:19:04 +03:00
Svyatoslav Kuzmich 97717afec4 [JS IR BE] Choose actual declaration of COROUTINE_SUSPEND_NAME 2018-09-04 20:19:04 +03:00
Svyatoslav Kuzmich 5192783669 [JS IR BE] Workaround empty blocks in state machine builder 2018-09-04 20:19:03 +03:00
Svyatoslav Kuzmich e0237a4480 [JS IR BE] Check for unbound symbols in type operator lowering 2018-09-04 20:19:03 +03:00
Svyatoslav Kuzmich 437a68daca [JS IR BE] Check number of value arguments in toString 2018-09-04 20:19:03 +03:00
Svyatoslav Kuzmich a3afd101fa [JS IR BE] Delete expected enum classes 2018-09-04 20:19:03 +03:00
Svyatoslav Kuzmich dde1e9335e [JS IR BE] Don't copy type parameters in secondary ctor lowering 2018-09-04 20:19:03 +03:00
Svyatoslav Kuzmich a01b6de2d8 [JS IR BE] Add missing exceptions 2018-09-04 20:19:03 +03:00
Alexey Sedunov 9d5bd29e8b Misc: Render MemberInfo as 'abstract' only if it's present in source
#KT-26533 Fixed
2018-09-04 19:49:14 +03:00
Toshiaki Kameyama be30761ec4 "Convert to 'also'" intention: Fix for call expression has this receiver #KT-26009 Fixed 2018-09-04 19:29:44 +03:00
Toshiaki Kameyama e1dd85429f Extract function: make default visibility private #KT-25454 Fixed 2018-09-04 19:28:25 +03:00
Toshiaki Kameyama dc57887a4d Create function quick fix: fix visibility from inline method #KT-25228 Fixed 2018-09-04 19:01:22 +03:00
Toshiaki Kameyama e2945b1d12 Add quickfix for "Interface doesn't have constructors" #KT-17687 Fixed 2018-09-04 18:58:56 +03:00
Toshiaki Kameyama b5ba475696 "Redundant lambda arrow" inspection: Also report arrow with single underscore parameter #KT-24728 Fixed 2018-09-04 18:29:46 +03:00