Commit Graph

46663 Commits

Author SHA1 Message Date
Dmitry Petrov 5f0c9490bb Add test for smart cast on a value bound to when subject variable
E.g.:
  when (val y = x?.foo()) {
    null -> ...
    else -> ... // 'x' is also non-null here
  }
2018-06-20 14:06:34 +03:00
Dmitry Petrov 0a0bc67e8a Add test for UNUSED_VALUE on when subject variable 2018-06-20 14:06:34 +03:00
Dmitry Petrov c20c1abb68 Add test for VAL_REASSIGNMENT on when subject variable 2018-06-20 14:06:34 +03:00
Dmitry Petrov f6d446da47 It's ok to have no subject expression 2018-06-20 14:06:34 +03:00
Dmitry Petrov 7bc89b8871 Report error on illegal variable declaration in when subject 2018-06-20 14:06:34 +03:00
Dmitry Petrov 4fe894c03d Minor: extract variable subject processing to a separate fun 2018-06-20 14:06:34 +03:00
Dmitry Petrov 098d3eb235 Make smart casts work with variable declared in when subject 2018-06-20 14:06:34 +03:00
Dmitry Petrov 1eeafc2d0e Resolve variable declaration in 'when' subject 2018-06-20 14:06:34 +03:00
Toshiaki Kameyama 84e49e5b57 JS: Fix ClassCastException that occurs when 'when' clause has map range #KT-23458 Fixed 2018-06-20 14:00:29 +03:00
Toshiaki Kameyama 65ba57bcae JS: Fix TranslationRuntimeException on 'for (x in ("a"))' #KT-22376 Fixed 2018-06-20 13:59:10 +03:00
cobr123 db3c9962a2 Updates ReadMe.md JS issue link
{Backend. JS} instead {Back-end. JavaScript}
2018-06-20 12:51:10 +03:00
Dmitry Savvinov 9c61f65c0f Support internal compiler flags (-XX) in facets importing 2018-06-20 12:40:11 +03:00
Dmitry Savvinov 3fdfb49ac6 Minor: reformat and clean-up facetUtils.kt 2018-06-20 12:40:11 +03:00
Egor Neliuba 4fd076e4f4 Fix typo in DefaultErrorMessagesAndroid
"Delegating 'Parcelable' is now allowed" -> "Delegating 'Parcelable' is not allowed"
2018-06-20 01:04:30 +03:00
Yan Zhulanow 83ec49db31 Pill: Ignore kotlin-scripting compiler plugin from compiler arguments 2018-06-20 01:00:25 +03:00
Vyacheslav Gerasimov fa56afca08 as31: Revert unintended changes in plugin.xml.as31 2018-06-19 21:35:26 +03:00
Vyacheslav Gerasimov ea98a892d2 as31: Set until-build to 173.* instead of last AS 3.1 version (173.4301.25)
Was 173.4301.25 because of early builds of AS 3.2 which were 173 based
2018-06-19 21:05:58 +03:00
Vyacheslav Gerasimov fa2eafe214 as31: Update AS to 3.1.3.0 2018-06-19 21:05:57 +03:00
Mikhail Zarechenskiy fcacdc1fc5 Fix bridge methods generation when inline class types are used 2018-06-19 20:09:35 +03:00
Mikhail Zarechenskiy f326fd66be Propagate KotlinType into if expression codegen for inline classes 2018-06-19 19:54:22 +03:00
Mikhail Zarechenskiy c8c943e5fe [NI] Use context for relevant nested call to run call checkers
#KT-24808 Fixed
2018-06-19 19:54:21 +03:00
Roman Artemev f69bd54d6c [JS IR BE] Update test data 2018-06-19 17:09:31 +03:00
Roman Artemev 02628e8de3 [JS IR BE] Support exceptions in IR BE runtime 2018-06-19 17:09:24 +03:00
Roman Artemev b65443dd25 [JS IR BE] Support try-catch-finally in new backend 2018-06-19 17:08:14 +03:00
Alexey Tsvetkov cdfcedb897 Minor: reword progress message
#KT-24936 fixed
2018-06-19 15:43:24 +03:00
Pavel V. Talanov 5063a4ce3d JavaElementFinder: revert to using ContainerUtil.quicksort
Fix comparator contract violated exception
Scopes inherited from LibraryScopeBase violate the comparator contract
2018-06-19 13:40:23 +02:00
Alexander Udalov e689733f69 Revert "Map Kotlin TYPE target to Java TYPE_USE in bytecode"
This reverts commit d122406dca.

See KT-23857

 #KT-24952 Fixed
2018-06-19 12:08:18 +02:00
Alexander Udalov 863639c9ab Revert changes to data class equals/hashCode (KT-12330)
This looked like a small and useful change, but caused so many issues
(KT-24474, KT-24790, 30b9caea, and another unreported one -- see the
test update in this commit) that it didn't pay off after all. The
optimization is not that critical for now, as it's only relevant for
data classes where component types have trivial equals/hashCode
implementation, which is not very often

 #KT-12330 Declined
2018-06-19 12:05:55 +02:00
Max Medvedev 21ca06dace KT-22333 Extract function: make name editor focused once again 2018-06-19 12:51:18 +03:00
Toshiaki Kameyama 1e31d24e9b Add "Remove 'const'" quickfix for TYPE_CANT_BE_USED_FOR_CONST_VAL
So #KT-24815 Fixed
2018-06-19 12:48:13 +03:00
Toshiaki Kameyama c344354395 Add quick-fix for 'is' absence in when #KT-18810 Fixed 2018-06-19 12:48:13 +03:00
Toshiaki Kameyama 2427406a8f Add 'Change to val' quickfix for delegates without setValue
So #KT-13688 Fixed
2018-06-19 12:48:13 +03:00
Toshiaki Kameyama 3292137acb "Convert lambda to anonymous function": Don't suggest in inline function
So #KT-24792 Fixed
2018-06-19 12:48:12 +03:00
Toshiaki Kameyama fa58da85ee Add indices: don't suggest if parameter is destructuring declaration
So #KT-22162 Fixed
2018-06-19 12:48:12 +03:00
Toshiaki Kameyama 752c576e20 Reformat: AddForLoopIndicesIntention 2018-06-19 12:48:12 +03:00
Toshiaki Kameyama 2669193755 Use "Move to companion" quick fix for CONST_VAL_NOT_TOP_LEVEL_OR_OBJECT
So #KT-22871 Fixed
2018-06-19 12:48:12 +03:00
Toshiaki Kameyama 69d2e8898a "Main should return Unit" inspection: extend on JUnit test methods
So #KT-24509 Fixed
2018-06-19 12:48:11 +03:00
Toshiaki Kameyama b5e3db1811 Lambda to reference: fix false positive for parameter' class reference
So #KT-22041 Fixed
2018-06-19 12:48:11 +03:00
Toshiaki Kameyama 271cbc1dd3 Reformat: ConvertLambdaToReferenceIntention 2018-06-19 12:48:11 +03:00
Mikhail Glukhikh b87dd07dd1 Redundant companion reference: minor refactoring 2018-06-19 12:48:11 +03:00
Toshiaki Kameyama 5ad98a139d "Redundant Companion": Don't suggest if same callable name is in use
So #KT-24425 Fixed
2018-06-19 12:48:10 +03:00
Alexey Sedunov a2435ff3b0 Configuration: Add default gradle repository to settings.gradle
#KT-24614 Fixed
2018-06-19 12:22:41 +03:00
Alexey Sedunov 70287ce974 Configuration: Use Android variant as source set name
#KT-24839 Fixed
2018-06-19 12:22:41 +03:00
Alexey Sedunov 9a3a7fbcca Debugger: Dispose ExtractionData/ExtractionResult when necessary
This fixes memory leak due to extensive use of "Evaluate expression"
2018-06-19 12:22:41 +03:00
Alexey Sedunov 16dbc6fb4d Extract Function: Forbid inappropriate declarations inside extractable fragment
#KT-20467 Fixed
 #KT-20469 Fixed
2018-06-19 12:22:40 +03:00
Alexey Sedunov f7cda61b08 Copy/Paste: Add imports for non-qualifiable callable references
#KT-23407 Fixed
2018-06-19 12:22:40 +03:00
Alexey Sedunov 694997651a Override/Implement: Fix processing of unresolved types
#KT-17350 Fixed
2018-06-19 12:22:40 +03:00
Alexey Sedunov ed8b4b761a Override/Implement: Add 'actual' modifier to overrides of 'expect'
#KT-23106 Fixed
2018-06-19 12:22:40 +03:00
Alexey Sedunov 5f87e84966 Override/Implement: Do not insert super-call into extension body
Such super-calls are not are supported yet

 #KT-4311 Fixed
2018-06-19 12:22:39 +03:00
Alexey Sedunov c49eede054 Generate hashCode()/equals(): Support deep array equality
#KT-19102 Fixed
2018-06-19 12:22:39 +03:00