Commit Graph

36751 Commits

Author SHA1 Message Date
Mikhael Bogdanov f1c1fcf0fc Fix for KT-11969: ProGuard issue with private interface methods
#KT-11969 Fixed
2016-12-27 14:07:37 +01:00
Alexander Udalov 6444ccc962 Do not skip .kotlin_metadata files with only type aliases in them 2016-12-27 14:25:06 +03:00
Alexander Udalov 64e9c85c14 Do not build file stubs for nested classes from .kotlin_metadata files
Stubs for nested classes are going to be built inside the stubs for the
corresponding outer classes, building them on the top level is just going to
break everything (see EA-93105)
2016-12-27 14:21:59 +03:00
Alexander Udalov f8a88bdffb Fix "Rewrite at slice LEXICAL_SCOPE" for callable references
For special calls (when-expressions, if-expressions, etc.), do not attempt to
get type of the argument expression, which is the block with the callable
reference, instead get type of the callable reference itself. The difference
matters because for block expressions, a new lexical scope is created for each
getTypeInfo (see ExpressionTypingServices.getBlockReturnedType), and we do not
support rewrites of this value in the binding trace

 #KT-12044 Fixed
2016-12-27 10:45:46 +03:00
Mikhail Zarechenskiy 38a2518498 Fix computation of erased receiver for intersection types
#KT-9630 Fixed
2016-12-26 22:34:40 +03:00
Ilya Gorbunov f7d64ac807 Migrate exceptions to kotlin.reflect.full package and KotlinReflectInternalError to kotlin.reflect.jvm.internal package. 2016-12-26 20:05:54 +03:00
Ilya Gorbunov 9614404914 Move all extensions from kotlin.reflect package to kotlin.reflect.full in order not to have kotlin-reflect package split between kotlin-stdlib and kotlin-reflect modules.
Leave old API deprecated with a replacement provided and make those functions/properties inline pointing to moved ones.
2016-12-26 19:12:13 +03:00
Ilya Gorbunov 85232ffa07 Drop deprecated pre-1.0 API. Remove remaining usages in tests. 2016-12-26 19:07:20 +03:00
Ilya Gorbunov 72e461e2d5 Allow test invocations like Kotlin.isType or Kotlin.throwCCE with CHECK_NOT_CALLED_IN_SCOPE directive. 2016-12-26 19:01:45 +03:00
Alexander Udalov c4f731b987 Write Kotlin-Version to runtime artifacts built with Maven
Add a test that checks that Kotlin-Version and Kotlin-Runtime-Component have
been written to all relevant runtime libraries
2016-12-26 17:46:36 +03:00
Alexander Udalov 21f79cd737 Fix test data 2016-12-26 17:11:32 +03:00
Alexander Udalov e4e50017d0 Render header/impl on properties in tests and diagnostic messages
As a side effect, header/impl and some other modifiers on functions are now
rendered in a different, more natural, order
2016-12-26 17:06:24 +03:00
Alexander Udalov 5556c59fc9 Render platform name in multiplatform diagnostic tests
Prepend the platform name to the diagnostic in a common module, which is
reported when sources of that common module are analyzed as a part of the
platform source set: "<!JVM:...!> ... <!>". Fix some existing tests, mostly by
adding "impl" to implementations
2016-12-26 17:06:15 +03:00
Alexander Udalov e4d85ac527 Support header annotation classes in common modules
Properties are only allowed to be declared in a header class' primary
constructor if that class is an annotation class. However, we did not correctly
determine that such properties are also "header". The test passed because the
diagnostic was lost
2016-12-26 17:01:24 +03:00
Alexander Udalov 7d3628b9be CheckerTestUtil: introduce ActualDiagnostic to encapsulate Diagnostic 2016-12-26 17:01:20 +03:00
Alexander Udalov 6cfc42666c Refactor CheckerTestUtil
Simplify code somewhat, prepare for a larger refactoring
2016-12-26 16:49:58 +03:00
Alexey Andreev 11ce184d8e JS: add suspendCoroutine function 2016-12-26 12:45:14 +03:00
Alexey Andreev 2edb1ff081 JS: optimize imports in some unrelated files 2016-12-26 12:45:14 +03:00
Alexey Andreev f50f9dc22e JS: improve how base class for coroutines is implemented: 1) use JVM-like style of passing dispatcher 2) instead of flag, use additional "facade" continuation when dealing with dispatchers 2016-12-26 12:45:13 +03:00
Alexander Udalov cf2839a088 Fix light-analysis test data 2016-12-24 14:37:24 +03:00
Ilya Gorbunov 9619e08c9b Use emptyArray in orEmpty. 2016-12-24 02:03:48 +03:00
Ilya Gorbunov 05dcaccf09 Do not require array extensions being reified to create new array.
#KT-15377
2016-12-24 01:55:33 +03:00
Alexander Udalov 510295475b Batch script: allow to pass JAVA_OPTS from outside
Similarly to the Bash version

 #KT-14917 Fixed
2016-12-23 22:31:11 +03:00
Alexander Udalov dee70abf70 Update kdoc for KClass and KClassifier 2016-12-23 22:30:53 +03:00
Alexander Udalov 5402d50ea3 Light analysis tests: do not render empty lines between classes and in the beginning 2016-12-23 22:30:48 +03:00
Alexander Udalov 8fb7a70972 Fix manifest entries for kotlin-script-runtime and its sources
See target "script-runtime" in build.xml
2016-12-23 22:30:33 +03:00
Alexander Udalov 3719a0619d Merge definitions of build-helper-maven-plugin in runtime/pom.xml 2016-12-23 22:30:31 +03:00
Alexander Udalov 7146a6db74 Minor, drop unused DiagnosedRange#file 2016-12-23 22:30:16 +03:00
Alexander Udalov 0e11615780 J2K diagnostic tests: prettify 2016-12-23 22:30:06 +03:00
Alexander Udalov 8c0be58f56 J2K diagnostic tests: convert to Kotlin 2016-12-23 22:30:01 +03:00
Alexander Udalov 4e4f9312bb J2K diagnostics tests: rename .java -> .kt 2016-12-23 22:29:57 +03:00
Alexey Tsvetkov afa6aed699 Add test for multiplatform project import from gradle 2016-12-23 20:41:43 +03:00
Ilya Gorbunov f07323715f Provide some docs for dynamic.iterator() 2016-12-23 20:16:23 +03:00
Ilya Gorbunov b2a4c27709 Provide extension unsafeCast for dynamic.
#KT-15310
2016-12-23 20:16:21 +03:00
Ilya Gorbunov c43e4f6682 Uncomment some assertions for overflow behavior that now can pass in JS 2016-12-23 18:14:32 +03:00
Ilya Gorbunov 6b509892cb Remove manual overflow for JS arithmetic operations 2016-12-23 18:14:32 +03:00
Ilya Gorbunov d3c82a2741 Minor: optimize imports. 2016-12-23 18:14:32 +03:00
Mikhail Glukhikh 194ff4ee76 Check possible smart cast to enum in when subject #KT-14705 Fixed 2016-12-23 15:10:56 +03:00
Mikhail Glukhikh 0e70e3f80e USELESS_ELVIS_RIGHT_IS_NULL is no more reported for flexible left argument #KT-13593 Fixed 2016-12-23 15:10:49 +03:00
Dmitry Petrov 8d16bd1215 Method can be hidden if it is annotated with kotlin.internal.PlatformDependent,
or is a Java method from a Kotlin built-in class (transitively).

https://github.com/Kotlin/KEEP/blob/master/proposals/jdk-dependent-built-ins.md#backward-compatibility-of-overrides
2016-12-23 13:51:08 +03:00
Dmitry Petrov d9271b54fb Fix IR generation: temporary variable in 'hashCode()' for data class should be 'var' 2016-12-23 10:44:14 +03:00
Dmitry Jemerov 514fc02938 Propagate 'implement' dependencies from Gradle to IDEA project model 2016-12-22 20:57:24 +03:00
Alexey Andreev 9b4b7960d3 JS: prevent compiler from importing module more than once if not necessary. See KT-15260 2016-12-22 17:19:25 +03:00
Alexey Andreev 1ecd957981 JS: fix translation of delegated constructor call from secondary constructor when argument is a complex expression which translates to multiple statements. See KT-15357 2016-12-22 17:19:24 +03:00
Alexey Andreev 1ab78dffe5 JS: fix translation of for statement when either next or hasNext method translates to multiple statements. Fix KT-15367 2016-12-22 17:19:24 +03:00
Alexey Andreev cef32b3327 JS: initialize fields of coroutine state machine with undefined value so that they match local variable semantics. Fix KT-15366 2016-12-22 17:19:23 +03:00
Alexey Andreev 8ef284daf4 JS: improve temporary variable elimination in some cases. Apply redundant statement elimination when statement in not synthetic, but its expression is 2016-12-22 17:19:23 +03:00
Alexey Andreev 35ab41e900 JS: when removing unused temporary variable, process its RHS value. Fix KT-15325 2016-12-22 17:19:22 +03:00
Nikolay Krasko 49d57124c1 Take new name when layout rename started from reference 2016-12-22 16:20:29 +03:00
Nikolay Krasko da5f2a0784 Always return identifier from handleElementRename() (KT-14358)
Returning reference will lead to replacing identifier with reference, that result bad psi, bad stubs, and failure at some point.

 #KT-14358 Fixed
2016-12-22 16:20:29 +03:00