Dmitry Petrov
ec99fa2142
Ensure that 'in/!in x until y' intrinsic works
2017-07-10 10:51:26 +03:00
Dmitry Petrov
05cad83c79
Fix tests for in/in! with primitive range literals
...
- ClosedFloatingPointRange<T>
- IntRange, etc
- extensions in kotlin.ranges for ranges of Byte/Int/Short
2017-07-10 10:51:26 +03:00
Dmitry Petrov
5decf65d6a
Ensure that no range instance is created for 'x in array.indices'
2017-07-10 10:51:26 +03:00
Dmitry Petrov
4320b63922
Ensure that no boolean negation is generated for !in expression
...
#KT-18777 Fixed Target versions 1.1.4
2017-07-10 10:51:26 +03:00
Dmitry Petrov
b9c0ecf2b1
Ensure that ranges are not created for in-Comparable-range-literal
...
#KT-6247 Fixed Target versions 1.1.4
2017-07-10 10:51:26 +03:00
Dmitry Petrov
7175361c97
Ensure that BranchedValue for in/!in work well with boolean operations
2017-07-10 10:51:26 +03:00
Dmitry Petrov
a3cd4f415a
Add test for comparison used for primitives and Comparable
...
There's a subtle difference in behavior between comparing
primitive Float/Double (comparison follows IEEE standard)
and boxed Float/Double (comparison is a total order).
Make sure this corner case is preserved.
2017-07-10 10:51:26 +03:00
Dmitry Petrov
fd402cb76c
Provide intrinsic for in/in! expression with range of Comparable
2017-07-10 10:51:26 +03:00
Dmitry Petrov
bd2021411c
Don't use intrinsic 'in' generator for non-intrinsified 'in' expressions
2017-07-10 10:51:26 +03:00
Dmitry Petrov
a7071ae7af
Provide intrinsic generators for in/!in expression
...
TODO some tests should fail because range of comparables
(e.g., '"Alpha" .. "Omega"') is currently not implemented
2017-07-10 10:51:26 +03:00
Dmitry Petrov
e3320c53f5
Minor: AbstractForInRangeWithGivenBoundsLoopGenerator
2017-07-10 10:51:26 +03:00
Dmitry Petrov
e261b8edf8
Minor: extract high-level interface for ForLoopGenerator
2017-07-10 10:51:26 +03:00
Dmitry Petrov
c870eeac2e
RangeCodegenUtil: convert to Kotlin + cleanup
2017-07-10 10:51:26 +03:00
Dmitry Petrov
304e4e8dce
RangeCodegenUtil: .java -> .kt
2017-07-10 10:51:26 +03:00
Dmitry Petrov
6140f29818
Ranges: introduce RangeValue class
...
The overall idea is to unify intrinsics for 'for-in' loop generation
and for 'in'/'!in' expression generation.
2017-07-10 10:51:26 +03:00
Alexey Andreev
811da2e285
Compile stdlib-js with source map
2017-07-09 14:22:08 +03:00
Ilya Chernikov
25c731241b
Fix parallel daemon start test reporting
2017-07-08 18:16:29 +02:00
Ilya Chernikov
21eed9ee78
Get rid of kotlin.Unit usage in RMI interfaces
...
attempt to fight mysterous "Cannot instantiate kotlin.Unit" exception.
2017-07-08 18:16:29 +02:00
Ilya Chernikov
06d27a9efa
Fix failing tests on TC on Windows by falling back to standard launcher
...
...in one more case
Plus some minor test tweaks, diagnostics improvement and important comments
2017-07-08 18:16:28 +02:00
Ilya Chernikov
e4ed217a3b
Add missing explicit serialVersionUID to the REPL API classes
2017-07-08 18:16:27 +02:00
Ilya Chernikov
8542e878f7
Refactor daemon periodic check and shutdown logic
...
Cleaner logic and logging, improved stability during shutdown, reduced
overhead of the periodic checks, and regular calls, should also eliminate
dying daemons scenario on parallel execution (another attempt to do it).
2017-07-08 18:16:26 +02:00
Ilya Chernikov
2c35675fd6
Refactor daemon parallel start test to improve diagnostics
...
also add daemon info to the RPC
and remove redundant daemon stopping calls, that should speed up
tests execution
2017-07-08 18:16:26 +02:00
Ilya Chernikov
e2d2c5ff42
Refactor daemon startup for better logging and cleaner code
2017-07-08 18:16:25 +02:00
Ilya Chernikov
2ec2a08753
Implement advanced gradle script template selection in the provider, improve diagnostics
2017-07-08 18:16:24 +02:00
Ilya Chernikov
ebcac3dd01
Use renamed Gradle Kotlin DSL template in the provider when available
2017-07-08 18:16:24 +02:00
Pavel V. Talanov
bf09d91e80
script.runtime: restore old apis and mark as deprecated
...
Needed for compatibility (i.e. with old gradle kdsl versions)
2017-07-08 15:10:46 +03:00
Pavel V. Talanov
20be924bbb
script.runtime: update api
...
- Clean up some api inconsistencies
- Provide experimental async resolver to allow cleaner async updates of dependencies
2017-07-08 15:10:45 +03:00
Alexander Udalov
127cd1295e
Disable JSR-305 annotations by default, introduce CLI argument
...
No package annotations are going to be loaded, and
TypeQualifierDefault/TypeQualifierNickname are no longer recognized by
default. Use the CLI argument "-Xload-jsr305-annotations" to enable this
behavior back
#KT-10942
2017-07-07 22:08:50 +03:00
Mikhail Glukhikh
522f67fda0
Severity is softened for some style issues
2017-07-07 18:15:38 +03:00
Mikhail Glukhikh
a960fa78cb
Use expression body: add new line more accurately
2017-07-07 18:15:36 +03:00
Mikhail Glukhikh
b0fda5f451
Lift return out fix: do not suggest for labeled returns
2017-07-07 18:15:35 +03:00
Mikhail Glukhikh
41893736df
Cleanup: make single KtExpression.isElseIf
2017-07-07 18:15:34 +03:00
Mikhail Glukhikh
a6f0b7c7a4
Preferred style inspections: WEAK WARNING -> INFO
2017-07-07 18:15:33 +03:00
Mikhail Glukhikh
1d2017b0fc
Cleanup: apply "cascade if..." inspection (+ some others)
2017-07-07 18:15:32 +03:00
Mikhail Glukhikh
9c06739594
Cleanup: apply "lift out..." inspection (+ some others)
2017-07-07 18:15:30 +03:00
Mikhail Glukhikh
0c41ceea9d
"Cascade if" inspection: do not suggest for one-line if
2017-07-07 18:15:28 +03:00
Mikhail Glukhikh
0fe9030eba
"Cascade if" inspection: don't highlight for complex logical conditions
...
Related to KT-18615
2017-07-07 18:15:27 +03:00
Mikhail Glukhikh
8273eff1a1
Introduce "cascade if" inspection suggesting replacement with when
...
So #KT-18615 Fixed
2017-07-07 18:15:26 +03:00
Mikhail Glukhikh
1ddaee5b4a
"Lift return / assignment": don't highlight if other returns available
2017-07-07 18:15:24 +03:00
Mikhail Glukhikh
691b733c55
"Lift return / assignment": do not suggest for else arguments
2017-07-07 18:15:22 +03:00
Mikhail Glukhikh
042990dda1
"Lift return / assignment": do not suggest for too long expressions
2017-07-07 18:15:21 +03:00
Mikhail Glukhikh
398f92dc6f
Lift assignment out: do not suggest if other assignments available
...
So #KT-18709 Fixed
2017-07-07 18:15:20 +03:00
Mikhail Glukhikh
9c4dfa3343
Lift return out: do not suggest for lambda in return #KT-18711 Fixed
2017-07-07 18:15:18 +03:00
Mikhail Glukhikh
c0d10264bc
Lift assignment out: do not highlight for exactly one assignment
...
Related to KT-14900
2017-07-07 18:15:17 +03:00
Mikhail Glukhikh
1010ecca8c
Lift return out: do not report for zero returns
...
Also, do not highlight (but suggest fix) for exactly one return
Related to KT-14900
2017-07-07 18:15:16 +03:00
Mikhail Glukhikh
2deef48b84
Cleanup code: BranchedFoldingUtils
2017-07-07 18:15:15 +03:00
Mikhail Glukhikh
2d1abda9a1
Convert "lift return / assignment" intentions into a single inspection
...
Also includes minor test fix, related to KT-14900
2017-07-07 18:15:14 +03:00
Mikhail Glukhikh
8f33bd0768
Handle break / continue / throw in lift return / assignment intentions
...
So #KT-14900 Fixed
2017-07-07 18:15:09 +03:00
Mikhail Glukhikh
523cbc6723
Convert to expression body: insert new-line after = for long lines
2017-07-07 18:15:07 +03:00
Mikhail Glukhikh
d08b18f5f8
Introduce "use expression body" inspection #KT-16063 Fixed
...
Converted from the relevant intention
Reported cases: one-liners, whens
Also, more exact caret detection in local inspection tests
2017-07-07 18:15:06 +03:00