Commit Graph

26734 Commits

Author SHA1 Message Date
Dmitry Jemerov 23e13d4043 fix type parameter migration for extension functions 2015-10-12 13:45:44 +02:00
Andrey Breslav 045df48588 Minor. TRAIT -> INTERFACE 2015-10-12 14:40:48 +03:00
Andrey Breslav a2e5e60c68 TRAIT -> INTERFACE in diagnostics 2015-10-12 14:36:38 +03:00
Dmitry Petrov ff1bf673ba Java 8 override restrictions: interface can't implement a method of 'Any'
- update Range and related classes
2015-10-12 14:12:31 +03:00
Dmitry Petrov 7e9e427d4c Java 8 rules for method overrides:
- report errors on implementing methods of Any in interfaces
- update testData

~~~

Java 8 override restrictions: interface can't implement a method of 'Any'
- update compiler sources
2015-10-12 14:12:31 +03:00
Dmitry Petrov 5d9ee7efee Java 8 rules for method overrides:
- base class method wins against a (default) interface method,
so an abstract base class method should always be implemented
in a derived class;

- interface methods clash regardless of abstract/default
with possibly undefined behavior at run-time,
so a class or interface should always define its own method
for methods inherited from multiple interfaces and not from base class;

- meaningful diagnostics for class inheriting conflicting JVM signatures.
Since no override will happen under Java 8 rules,
ACCIDENTAL_OVERRIDE is misleading for this case;

- update testData.
2015-10-12 14:12:31 +03:00
Mikhail Glukhikh 82c0265cb3 Quick fix for implicit nothing with a test 2015-10-12 13:30:22 +03:00
Mikhail Glukhikh 64543e3f52 Implicit Nothing return type is now deprecated 2015-10-12 13:30:16 +03:00
Mikhail Glukhikh 65f0f312ff Private setter is now forbidden for non-private late init variables 2015-10-12 13:30:13 +03:00
Dmitry Jemerov 2cab34bb3f drop hexadecimal double literals 2015-10-12 11:32:34 +02:00
Dmitry Jemerov ead19076d7 stop calling propertyDelegated() method 2015-10-12 11:16:12 +02:00
Dmitry Jemerov 457e40a0b8 fix a few more tests 2015-10-12 11:11:31 +02:00
Dmitry Jemerov 02a242f15a parser tweaks to compensate for removal of static type assertions 2015-10-12 11:11:30 +02:00
Dmitry Jemerov a63d3f5a0f fix more compilation errors and some tests 2015-10-12 11:11:29 +02:00
Dmitry Jemerov f5aaf65ca9 remove usages of static type assertions from the compiler 2015-10-12 11:11:28 +02:00
Dmitry Jemerov 1523d5bcbf removing static type assertions work in progress 2015-10-12 11:11:23 +02:00
Nikolay Krasko 8f87efc0a2 Update to IDEA 143.116.4 2015-10-12 11:49:47 +03:00
Ilya Gorbunov 7ff0e140f0 Update MockJDK to include Pattern.class required in tests for #KT-7732 2015-10-12 00:13:37 +03:00
Ilya Gorbunov 4ae2491ab6 J2K: Special conversion for java.lang.String methods: String.join (cannot be tested with MockJDK)
#KT-7732
2015-10-12 00:13:23 +03:00
Ilya Gorbunov 5914625b53 J2K: Special conversion for java.lang.String methods: more accurate parameter count matching for String.format
#KT-7732
2015-10-12 00:13:09 +03:00
Ilya Gorbunov 77a46cab92 J2K: Special conversion for java.lang.String methods: tests for lastIndexOf
#KT-7732
2015-10-12 00:12:55 +03:00
Ilya Gorbunov 7a0a23366c Use PsiExpressionEvaluator to evaluate constant limit value. 2015-10-12 00:12:41 +03:00
Denis Zharkov 3bb8cf1bff Temporary restore CharSequence.get extension 2015-10-11 19:59:31 +03:00
Denis Zharkov a76a8fcc3f Adjust various testData to remove/charAt transformation 2015-10-11 19:59:31 +03:00
Denis Zharkov 6d864e0854 Adjust collection stubs generating to 'remove' transformation
See substitutedList* tests in Backend
2015-10-11 19:59:30 +03:00
Denis Zharkov 1c7fa42b86 Adjust js codegen and lib to 'charAt' -> 'get' transformation 2015-10-11 19:59:30 +03:00
Denis Zharkov 6f4579213c Adjust rendered descriptors after remove/charAt transformations 2015-10-11 19:59:30 +03:00
Denis Zharkov 3733d0e84f Adjust stdlib to remove/charAt transformation 2015-10-11 19:59:25 +03:00
Denis Zharkov 89ded4ab1d Implement hack to support both remove() and removeAt() in MutableList<Int>
Also add couple of tests about CharSequence.get
2015-10-11 19:57:22 +03:00
Denis Zharkov 742a538aed Support loading builtin methods from Java with different names 2015-10-11 19:57:22 +03:00
Denis Zharkov 3f5498e9f5 Transform some builtin methods
1. CharSequence.charAt -> get
2. ML.remove(Int) -> removeAt,
3. MC.remove(Any?) -> MC.remove(E)
2015-10-11 19:57:21 +03:00
Denis Zharkov a98d1e1e55 Minor. Convert some properties to functions 2015-10-11 19:57:08 +03:00
Alexander Udalov c78410855d Refactor CallableClsStubBuilder, separate functions and properties 2015-10-11 17:10:41 +03:00
Alexander Udalov 9d626ef1d9 Rename KotlinCallable annotation to KotlinFunction 2015-10-11 17:10:40 +03:00
Alexander Udalov 55dd51814f Don't serialize built-in enum entries
These files are never read anyway
2015-10-11 17:10:39 +03:00
Alexander Udalov 15b0d3c7c7 Minor, safer way to avoid storing defaults in proto 2015-10-11 17:10:39 +03:00
Alexander Udalov d4320b43fa Delete useless class, simplify reading class visitor 2015-10-11 17:10:38 +03:00
Alexander Udalov 9e4823ef82 Write module name to metadata, fix reflection for file facades
Module name will be used for proper introspection of internal members
2015-10-11 17:10:37 +03:00
Alexander Udalov 0218e0351b Deprecate KPackage, to be removed later 2015-10-11 17:10:37 +03:00
Alexander Udalov 790c59d9e5 Increase ABI & stub version
See previous commits for motivation
2015-10-11 17:10:36 +03:00
Alexander Udalov 37c36f806a Rename foreignKotlinClass -> getOrCreateKotlinClass
Previously this cache contained only Java (hence 'foreign') classes, that is
not the case anymore
2015-10-11 17:10:35 +03:00
Alexander Udalov a4732b442d Don't create KClass and KPackage instances in <clinit>
This proved to be a fragile technique, which probably doesn't even improve
performance in most cases but has lots of unexpected problems: unconditional
initialization of reflection classes, increasing the size of the bytecode, bugs
with <clinit> in annotations on JVM 6, inability to support conversion of a
class from Kotlin to Java without recompiling clients which use it
reflectively, etc.
2015-10-11 17:10:35 +03:00
Alexander Udalov fe737886cd Drop deprecated K*Function interfaces 2015-10-11 17:10:34 +03:00
Alexander Udalov 8c4d7fdf24 Drop deprecated nested classes from Kotlin metadata annotations 2015-10-11 17:10:33 +03:00
Alexander Udalov 1497648093 Add KOTLIN_MULTIFILE_CLASS annotation to KotlinAbiVersionIndex
It was forgotten during the package reform
2015-10-11 17:10:33 +03:00
Alexander Udalov 1c229d173e Forget old classes from jet.runtime.typeinfo.*, drop JetValueParameter 2015-10-11 17:10:32 +03:00
Alexander Udalov e3a5590eb7 Simplify FQ name check in ReflectionTypes
Fix EA-73058
2015-10-11 17:10:32 +03:00
Alexander Udalov cf54a76e3b Optimize JvmStringTable, don't store operation = NONE which is default 2015-10-11 17:10:31 +03:00
Alexander Udalov 934ffed944 Don't write field signatures when not necessary 2015-10-11 17:10:30 +03:00
Alexander Udalov 864926ee2e Don't always write JVM method signatures to metadata
When the trivial type mapping (implemented in JvmProtoBufUtil) from
ProtoBuf.Type instances works fine, don't write the signature since it can be
loaded by exactly the same trivial type mapping
2015-10-11 17:10:30 +03:00