Commit Graph

36337 Commits

Author SHA1 Message Date
Alexey Andreev e4b4c19b87 JS: prevent IDL2K from generating delegated constructor calls 2016-12-29 16:00:33 +03:00
Alexey Andreev 1a7e8b0690 JS: allow to omit delegated constructor call for external classes in common FE. Prohibit delegated constructor call for external classes in JS FE. 2016-12-29 16:00:33 +03:00
Alexey Andreev 02ea1a4d64 JS: split error diagnostic about body of external declaration into three different diagnostics (additional ones: wrong initializer, wrong default value of parameter). 2016-12-29 16:00:32 +03:00
Alexey Andreev de664de0bf JS: regenerate stdlib files from IDL 2016-12-29 16:00:32 +03:00
Alexey Andreev b1561bd9ab JS: update IDL2K to generate correct declarations WRT new restrictions for external declarations 2016-12-29 16:00:32 +03:00
Alexey Andreev e8a1b7d6ff JS: update stdlib to respect new restrictions for external declarations 2016-12-29 16:00:31 +03:00
Alexey Andreev 06e83e895f JS: update backend tests to respect new front-end rules for external declarations 2016-12-29 16:00:31 +03:00
Alexey Andreev 6ef4a3389e JS: prohibit external functions and accessors with bodies other than noImpl. Prohibit to use anything except noImpl for default parameters initializers in external functions. See KT-13892 2016-12-29 16:00:30 +03:00
Alexey Andreev 55d4c0e439 JS: prohibit non-abstract members of external interfaces, except for nullable properties. See KT-15308 2016-12-29 16:00:30 +03:00
Alexey Andreev 403753f5b5 JS: prohibit inline external declarations. See KT-15307 2016-12-29 16:00:29 +03:00
Alexey Andreev 84f094c770 JS: prohibit to implement functional interfaces. See KT-15136 2016-12-29 16:00:29 +03:00
Ilya Gorbunov 822e58ad83 Map.getOrImplicitDefault is exposed public as Map.getValue
#KT-11851
2016-12-29 07:49:27 +03:00
Ilya Gorbunov 0a840d0174 Migrate 1.1 reflection API usages in tests. 2016-12-29 06:51:01 +03:00
Ilya Gorbunov 405a79549a Migrate 1.1 reflection API usages 2016-12-29 06:51:00 +03:00
Yan Zhulanow 78a3dae314 Kapt3: Always write Kotlin stubs to .java files, and make javac always parse them from source files, not from JCTree (in order to support incremental compilation). 2016-12-28 22:28:35 +03:00
Yan Zhulanow 9b9b36e332 Kapt3: Kapt task should depend on all Java task dependencies 2016-12-28 22:28:34 +03:00
Yan Zhulanow fdb568f86d Kapt3: Generate incremental compilation metadata (light classes with Kotlin metadata) 2016-12-28 22:28:33 +03:00
Yan Zhulanow aa84cc4911 Kapt3: Fix stack trace reporting (KT-15433) 2016-12-28 22:28:32 +03:00
Yan Zhulanow 8953e33417 Kapt3: Force annotation processing classpath entries to be unique 2016-12-28 22:28:31 +03:00
Yan Zhulanow 5844f3cf1b Kapt3: Write stub class files with metadata (needed for incremental compilation) 2016-12-28 22:28:30 +03:00
Yan Zhulanow 400759826f Add DataBindingComponentShortNamesCache and DataBindingShortNamesCache to ignored caches for Java callables sources. Extract filteredShortNamesCaches property 2016-12-28 22:18:06 +03:00
Yan Zhulanow 6bff4a4ed4 Exclude BrShortNamesCache from processJvmCallablesByName() because of the severe lags in Java static member import quickfix. (KT-14308)
Also exclude Kotlin light classes cache because light classes are filtered out anyway.
2016-12-28 22:18:06 +03:00
Yan Zhulanow 4667947315 Kapt3: Nested class inside an interface should always be public and static (KT-15145) 2016-12-28 22:18:06 +03:00
Yan Zhulanow d918015c30 Kapt3: Attach additional compiler plugins to kapt<sourceSetName>Compile task 2016-12-28 22:18:05 +03:00
Yan Zhulanow 3f638b8677 Kapt: Fix kapt3 on Linux (KT-15375) 2016-12-28 22:18:05 +03:00
Yan Zhulanow 8a9c858d78 Minor: review changes 2016-12-28 22:18:05 +03:00
Yan Zhulanow a4b21f3b08 Android Gradle plugin: Fix compatibility with Android Studio 2.3 (KT-15376) 2016-12-28 22:18:05 +03:00
Yan Zhulanow 142496c00f Kapt: Parse generic signatures with inner class types correctly 2016-12-28 22:18:04 +03:00
Mikhail Glukhikh 5f3c1dfc41 More accurate check of repeated use-site annotations #KT-13859 Fixed 2016-12-28 19:01:20 +03:00
shiraji 778289fefe Add inspection that reports unused equals expression #KT-6217 Fixed 2016-12-28 16:41:22 +03:00
Alexander Udalov 73845bfc27 Fix light-analysis test data 2016-12-27 18:19:49 +03:00
Mikhail Zarechenskiy e448695578 Introduce language feature for refined sam adapters priority 2016-12-27 16:44:23 +03:00
Alexander Udalov b4051c4577 Do not generate unnecessary super-call checks for functions with defaults
Such check should only be generated for a function in an open class

 #KT-11962 Fixed
2016-12-27 16:22:12 +03:00
Alexander Udalov 3d9c264d63 Do not generate CHECKCAST after 'null' literal
#KT-15411 Fixed
2016-12-27 16:22:12 +03:00
Mikhael Bogdanov 4c9bac084c Fix for KT-15437: VerifyError: Bad local variable type on simplest provideDelegate
#KT-15437 Fixed
2016-12-27 14:07:37 +01:00
Mikhael Bogdanov b5ec30666b Fix for KT-15410: "Protected function call from public-API inline function" for protected constructor call
#KT-15410 Fixed
2016-12-27 14:07:37 +01:00
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