Commit Graph

42392 Commits

Author SHA1 Message Date
Alexander Udalov dfd24d166c Update bootstrap to 1.2.0-dev-439 2017-10-30 15:38:38 +01:00
Simon Ogorodnik 213ce01152 Update testData for completion, broken after KT-13220 2017-10-30 17:31:15 +03:00
Ilya Gorbunov f878fa69c1 Android codegen tests: fix android SDK path in local.properties
The path should have slashes instead of backslashes even on Windows.
2017-10-30 16:48:39 +03:00
Ilya Gorbunov 1af692c957 Code style settings format changed in IDEA 173 2017-10-30 16:46:24 +03:00
Dmitry Petrov cbef372e69 Recapture shared variables when calling local class constructor
When a local function or class A creates an instance of a local class B
capturing an outer variable 'x', it should use ref for 'x', but not the
value of 'x'.
2017-10-30 15:19:13 +03:00
Dmitry Petrov 7a156e4407 Give unique names to fields for captured local functions
When a local function is captured, corresponding field accesses are
later transformed by the inliner. It doesn't have enough information to
restore the original semantics completely, so it has to rely on field
names. Local functions can be overloaded or can have names matching
local variable names, in both cases we generated fields with the same
name for captured values.

Now, we use the same '$<local-class-number>' suffix for field names for
local functions as it is present in the corresponding local class name.
This allows to distinguish captured local functions from captured local
variables and between different overloads of a function with the same
name.

 #KT-19827 Fixed
 #KT-18639 Fixed
2017-10-30 15:19:13 +03:00
Dmitry Petrov da99a100cc Additional constructor call normalization tests 2017-10-30 15:19:13 +03:00
Mikhail Glukhikh 149daa173c Do not report "unused receiver" on operator and infix functions
So #KT-16340 Fixed
2017-10-30 15:07:39 +03:00
Alexander Udalov 54990e16c1 Report error if tools.jar is not found in javac-wrapper 2017-10-30 12:36:55 +01:00
Mikhail Glukhikh 561d7749b1 Choose implementing module correctly in "create actual fix"
Take implements / expectedBy dependency into account
So #KT-20803 Fixed
2017-10-30 14:13:10 +03:00
Mikhail Glukhikh f0da58531e Enhance AbstractQuickFixMultiModuleTest
Handle same files at different source roots correctly
2017-10-30 14:12:27 +03:00
Mikhail Glukhikh cfd432614f Cleanup: QuickFixMultiModuleTest 2017-10-30 14:12:25 +03:00
Mikhail Glukhikh 64dbe07fdb Cleanup: UnusedReceiverParameterInspection 2017-10-30 14:12:16 +03:00
Alexey Andreev 1f643ddce8 JS: add test to prove that KT-11910 is not reproducible anymore 2017-10-30 13:12:12 +03:00
Alexey Andreev 6b43465ed8 JS: add tests to check if super.equals/hashCode works properly
See KT-8226
2017-10-30 13:12:10 +03:00
Alexey Andreev e9e01b70a8 JS: fix super access to simple non-overridable properties
See KT-7653
2017-10-30 13:12:09 +03:00
Alexey Andreev e488cf13ad JS: fix FE crashing when type argument count less than parameter count
See KT-20908
2017-10-30 13:10:35 +03:00
Alexey Andreev a6e98c30d7 JS: fix crash when js function contains assignment with bad LHS
Fix KT-20905
2017-10-30 13:08:35 +03:00
Nicolay Mitropolsky a11cf253df UAST: correct processing of string literals in string literals (KT-20990) 2017-10-30 11:29:51 +03:00
Yoshinori Isogai 11f9c055fd KT-20591: Show annotations in parameter info (#1358)
Show annotations in parameter info

 #KT-20591 Fixed
2017-10-27 22:59:04 +03:00
Alexander Udalov 2c4e023cba Minor, use extracted variable in LateinitIntrinsics.kt 2017-10-27 18:06:43 +02:00
Nikolay Krasko d75656d571 Additional tests for overloads with type aliases and suspend
Failed attempts to reproduce KT-20782, but still may be useful.
2017-10-27 15:09:52 +03:00
Nikolay Krasko 2d7fe98e55 Don't resort deserialized descriptors based on renderer, preserve proto order
Use only names and types for sorting. Otherwise if deserialized descriptor
is rendered different from origin we might get Psi-Stub mismatch error.

Use the original proto order for declarations with same name and kind.

 #KT-20782 Fixed
 #EA-109887 Fixed
2017-10-27 15:09:04 +03:00
Nikolay Krasko 1408c4bd44 Fix testdata for ParcelQuickFixTestGenerated 2017-10-27 14:56:03 +03:00
Nikolay Krasko 3186c31ba7 Initialize delegate runner before access in filter method 2017-10-27 14:56:02 +03:00
Denis Zharkov 2df4d9496a Fix incorrect UNINITIALIZED_ENUM_COMPANION diagnostic
#KT-20959 Fixed
2017-10-27 09:36:00 +03:00
Sergey Ryabov b3b08514c5 Use consistent explicit FileTreeWalk named parameters 2017-10-27 05:38:43 +03:00
Artem Zinnatullin b565b00930 Fix Gradle plugin task name in readme. 2017-10-27 02:55:44 +03:00
Sergey Ryabov d6504d82b7 Fix the doc for String.format and String.Companion.format 2017-10-27 02:53:09 +03:00
Ilya Zorin 5541634187 Explicitly set utf-8 encoding for JavaCompile tasks 2017-10-26 21:34:50 +03:00
Ilya Gorbunov e8e09dbbf8 Various improvements in collection samples #KT-20357
Merge some related samples,
add sample for building a sequence from Enumeration similar to building a list from Enumeration.
2017-10-26 21:28:47 +03:00
Alexey Belkov 72354559e5 Provide samples for list, collection and array related functions #KT-20357 2017-10-26 21:28:47 +03:00
Alexey Sedunov 97332aaeea MPP: Support Mocha/Protractor run configuration for common modules
This is useful when they are implemented by JavaScript modules
2017-10-26 20:59:40 +03:00
Alexey Sedunov 3319fdba6d Gradle: Import test output path for JavaScript modules 2017-10-26 20:59:40 +03:00
Nikolay Krasko ef274ad43b Don't build light classes when usages in Kotlin local scope requested 2017-10-26 17:58:07 +03:00
Nikolay Krasko 189e2506d1 Refactoring: extract isOnlyKotlinSearch function 2017-10-26 17:58:06 +03:00
Nikolay Krasko 55996fa43d Minor: extract scope initialization out of cycle 2017-10-26 17:58:05 +03:00
Dmitry Petrov 28535a57d8 Fix issues with enum entry self-reference
Given a singleton class 'S' with possibly uninitialized static instance
(enum entry, interface companion object).
Such singleton can be referenced by name, or as an explicit or implicit
'this'.
For a given singleton class 'S' we
either use 'this@S' from context (local or captured),
or 'S' as a static instance.

Local or captured 'this@S' should be used if:
  - we are in the constructor for 'S',
    and corresponding instance is initialized
        by super or delegating constructor call;
  - we are in any other member of 'S' or any of its inner classes.

Otherwise, a static instance should be used.
2017-10-26 16:11:58 +03:00
Dmitry Jemerov dd9f12d2e5 Removed dependencies on removed tasks 2017-10-26 14:23:56 +02:00
Dmitry Jemerov a1949e1d53 Add formatting rule for array literals
#KT-19599 Fixed
2017-10-26 14:10:12 +02:00
Nikolay Krasko 6420f50f2e Fix accessing nullable location() method 2017-10-26 13:15:51 +03:00
Ilya Gorbunov 3fe2298855 Do not run android codegen tests with plugin, introduce a separate task 2017-10-25 21:37:24 +03:00
Ilya Gorbunov 6c5d78d8d5 Remove deprecated build tasks 2017-10-25 21:37:24 +03:00
Ilya Gorbunov ace9d0da94 Finalize math function parameter names
#KT-4900
2017-10-25 21:30:03 +03:00
Alexey Andreev bbcf4f7caf JS: raise metadata version due to incompatible changes in 1.2 runtime 2017-10-25 20:18:04 +03:00
Alexey Andreev 85945e0a6d JS: add getFunctionById intrinsic 2017-10-25 20:18:04 +03:00
Alexey Andreev aae67e154a JS: add intrinsic for !!. Use it instead of ternary conditionals
See KT-2976
2017-10-25 20:18:03 +03:00
Simon Ogorodnik 8631e898a7 KT-12797: Fix completion to show inner classes from base class
#KT-12797 fixed
2017-10-25 18:07:37 +03:00
Simon Ogorodnik 5778ace6b0 KT-20166: Replace type name when caret is at the end of param name
When caret is at the end ('f<caret>: Foo'), tokenAt was COLON,
not IDENTIFIER

#KT-20166 fixed
2017-10-25 18:07:01 +03:00
Simon Ogorodnik d12f5c79a1 KT-20506: Fix completion suggests the same value recursively
Check for excludeNonInitializedVariable via PSI, not by
descriptors equality, because of bindingContext caching

#KT-20506 fixed
2017-10-25 18:05:46 +03:00