Commit Graph

51746 Commits

Author SHA1 Message Date
Ilya Matveev ecbadcdf6f Use project.container instead of WrapUtil
In Gradle 5.2 the 'WrapUtil.toNamedDomainObjectSet' method
was removed. This patches replaces usage of this method
with call of the 'Project.container' method.

Issue #KT-29725 Fixed
2019-02-06 18:21:42 +03:00
Denis Zharkov 1a630773cf Fix parent and containingFile for throws-reference list
Otherwise, exception is thrown during type inference
because default implementations effectively return null

^KT-29287 Fixed
2019-02-06 16:26:28 +03:00
Mikhail Glukhikh f040eaff27 FIR expressions: perform some names refactoring
FirAccess -> FirQualifiedAccess
FirAccessExpression -> FirQualifiedExpression
FirPropertyAssignment -> FirVariableAssignment
Introduce lValue & rValue in FirAssignment
Introduce separate indexes in FirArraySetCall
2019-02-06 11:59:06 +03:00
Mikhail Glukhikh 8ea4500ab4 Add test for PSI consistency #KT-24080 Fixed
This test checks that we handled all PSI elements properly
2019-02-06 11:59:03 +03:00
Mikhail Glukhikh 5e6ccb4b10 FIR total kotlin test: calculate also KtExpression/Declaration number 2019-02-06 11:59:02 +03:00
Mikhail Glukhikh 8dce8c1549 Make correct traverse in both FIR consistency tests 2019-02-06 11:59:01 +03:00
Mikhail Glukhikh db2fb86c8e Raw FIR: implement expression trees & conversions from PSI
Testing: total kotlin test controls no stubs in FIR in non-stub-mode
#KT-29002 Fixed
2019-02-06 11:58:59 +03:00
Mikhail Glukhikh aa97175d40 FIR generator: support type parameters with bounds for interfaces
This commits also reorders bridge visit functions
2019-02-06 11:58:58 +03:00
Toshiaki Kameyama fa1f3871c0 Add "Redundant 'requireNotNull' or 'checkNotNull' call" inspection
#KT-29113 Fixed
2019-02-06 11:10:27 +03:00
Mikhail Glukhikh c234683770 Fix changelog for 1.3.21 2019-02-06 11:03:13 +03:00
Mikhail Glukhikh df0e2dd50a Fix for canBeResolvedViaImport: check isExtension earlier
This commit fixes mistake in d202e96e and fixes broken tests
Related to KT-29713
2019-02-06 10:59:53 +03:00
Georgy Bronnikov ab1e334847 Reorganize phaser 2019-02-06 07:26:18 +03:00
Nikolay Krasko 89c5549b0a Refactoring: extract urls to separate class and remove long strings 2019-02-06 03:17:25 +03:00
shiraji d3895c519c Display Quick Documentation for reserved words
#KT-9934 Fixed
2019-02-06 03:17:24 +03:00
Mikhail Glukhikh 53607ba8d4 Add changelog for 1.3.21 2019-02-05 20:02:58 +03:00
Mikhael Bogdanov 0ce4c9bf00 Upgrade proguard to 6.0.3 to avoid corrupted stack maps 2019-02-05 16:14:51 +01:00
Mikhael Bogdanov b2606735c5 Properly capture local delegated properties in object constructor
#KT-23117 Fixed
2019-02-05 16:14:51 +01:00
Mikhael Bogdanov 9ab6062295 Properly capture extension receiver for array convention expressions in object constructor
#KT-19389 Fixed
2019-02-05 16:14:50 +01:00
Ilya Chernikov 3943bd1b15 Make toString for repl return function types nicer, drop obsolete isFunctionType 2019-02-05 16:13:06 +01:00
Ilya Chernikov b7e1dd96b2 Supply proper classloader to the evaluator, add another test for function type
and some minor refactoring
2019-02-05 16:13:06 +01:00
Nikolay Krasko aac9a3e953 Update since to 183.3283.2 as we already use API from it
Thanks to "Usage of Intellij API not available in older IDEs" inspection.
2019-02-05 16:54:34 +03:00
Nikolay Krasko 22a46d96c1 Update copyright in test module 2019-02-05 16:54:34 +03:00
Timo Obereder ff4279762e Fix comment placement on if/else in if or when condition #KT-28224 Fixed 2019-02-05 14:07:28 +03:00
Mikhael Bogdanov 520679a2b4 Regenerate JS tests 2019-02-05 11:55:42 +01:00
Mikhail Glukhikh d202e96ea1 Extract and use for inline KtSimpleNameExpression.canBeResolvedViaImport
Related to KT-29486
#KT-29713 Fixed
2019-02-05 13:32:33 +03:00
Mikhail Glukhikh cccc6bf315 Redundant enum constructor invocation inspection: minor rename 2019-02-05 12:57:14 +03:00
Toshiaki Kameyama 7cba11ff28 Can be private: don't report if it's used in inline property
#KT-29085 Fixed
2019-02-05 11:34:08 +03:00
Toshiaki Kameyama 2a7eb2fb0e Redundant lambda arrow: do not report on nested lambda
#KT-29093 Fixed
2019-02-05 11:27:41 +03:00
Toshiaki Kameyama bf7f7c81b1 Redundant explict type: do not report for aliased types
#KT-29128 Fixed
2019-02-05 11:24:32 +03:00
Toshiaki Kameyama 25952036af Reformat RedundantExplicitTypeInspection 2019-02-05 11:24:32 +03:00
Toshiaki Kameyama b9d8466fc0 Replace rangeTo with until: fix false negative with parenthesized expression
#KT-29153 Fixed
2019-02-05 11:22:59 +03:00
Toshiaki Kameyama c183f0285d Reformat ReplaceRangeToWithUntilInspection 2019-02-05 11:22:59 +03:00
Toshiaki Kameyama 9c468ef2aa Convert member to extension: preserve visibility
#KT-29248 Fixed
2019-02-05 11:22:02 +03:00
Toshiaki Kameyama e8a8bc89c9 Add "Redundant enum constructor invocation" inspection
#KT-29321 Fixed
2019-02-05 11:16:01 +03:00
Mads Ager 542d3c3532 JVM_IR: Fix stack underflow for unit coercion of when expressions.
Code such as

```
val b = getBoolean()
if (b) 4
else if (b) 5
```

didn't generate a value on the stack always and therefore would
have control-flow paths leading to a pop instruction with nothing
on the stack.

Change-Id: I09d059f361e56a41880006e3f4e51e9acdbd167d
2019-02-05 08:52:18 +01:00
Mark Punzalan e91a16556c JVM_IR: Do not add redundant field initializers.
Initializers are "set field" expressions and are considered redundant
when they are:
1. In the primary constructor; and
2. Set the field to `0`, `false`, or `null`; and
3. Have a `null` origin. I.e., not in an initializer block or
constructor body, and therefore the field could not have been set by a
prior expression.
2019-02-05 08:44:33 +01:00
kirill.shmakov 9e8972f1f9 Correct typo in comments 2019-02-04 14:30:37 +03:00
Mikhael Bogdanov 53aca0069c Update bootstrap version to 1.3.30-dev-1297 2019-02-04 09:04:44 +01:00
Kirill Shmakov aafb8473e9 Correct typo 2019-02-04 10:00:43 +03:00
kirill.shmakov 566dac8599 Correct suppress directive 2019-02-04 09:48:03 +03:00
Nikolay Krasko a75da632a6 Revert extension function in IndexUtils and better testing 2019-02-03 17:32:05 +03:00
Nikolay Krasko c89bee624a Minor: remove DocumentAdapter usage 2019-02-03 17:32:05 +03:00
Nikolay Krasko b8bbe10086 Support global inspections in tests (KT-29549)
#KT-29549 Fixed
2019-02-03 17:32:05 +03:00
Nikolay Krasko 56d56ab842 Make package name inspection global (KT-29549)
Report same package only once.

 #KT-29549 Fixed
2019-02-03 17:32:04 +03:00
Nikolay Krasko 6ee78fb629 Refactoring: extract name verifier code to settings class 2019-02-03 17:32:04 +03:00
Ilmir Usmanov 39de3c2ab1 Fix test data on JVM_IR BE 2019-02-01 21:45:44 +03:00
Ilmir Usmanov 20e4efaeab Fix test data 2019-02-01 17:33:49 +03:00
Vadim Brilyantov 4d68e08ab7 Change 191 idea version to 191.4738.6 2019-02-01 16:47:04 +03:00
Vadim Brilyantov 6a657714ec Move usage statistics to idea source root 2019-02-01 16:47:03 +03:00
Vadim Brilyantov 032a784d0b Implement statistics for the new API for intellij 191 2019-02-01 16:47:02 +03:00