Commit Graph

188 Commits

Author SHA1 Message Date
Ilya Gorbunov 70cc7fbf1f Remove never intentionally used String.hashCode extension. 2015-04-07 03:14:49 +03:00
Alexander Udalov 72aa3d1465 Use mock JDK in compiler tests where full JDK is not needed
- move some of boxWithStdlib tests under fullJdk/ directory, where they will be
  compiled against the full JDK
- introduce FULL_JDK in-text directive for the reflection test as only 4 tests
  out of 654 needed the full JDK
2015-04-02 21:57:48 +03:00
Dmitry Jemerov 39828bfd32 Implement kotlin.jvm.overloads annotation for generating all overloads of a method that has default parameter values.
#KT-2095 Fixed

fix backend-side issues with kotlin.jvm.overloads: support the annotation on constructors, generate nullablity annotations on parameters, generate generic signatures, add various tests
2015-04-02 20:30:26 +02:00
Dmitry Jemerov e15b984232 Implement kotlin.jvm.overloads annotation for generating all overloads of a method that has default parameter values.
#KT-2095 Fixed
2015-04-02 20:30:01 +02:00
Dmitry Jemerov 389498eb91 Merge pull request #621 from JetBrains/rr/yole/kt4142
Regression tests for some more obsolete issues in the JVM backend
2015-03-25 13:28:38 +01:00
Dmitry Jemerov 0467bba7a6 regression test for KT-5953 2015-03-24 21:05:23 +01:00
Dmitry Jemerov f6093274ab regression test for KT-5395 2015-03-24 20:59:56 +01:00
Dmitry Jemerov 9d229ad271 regression test for KT-4259 2015-03-24 20:49:53 +01:00
Dmitry Jemerov 4f0cf2f918 regression test for obsolete issue KT-4142 2015-03-24 19:14:18 +01:00
Dmitry Jemerov 2767e789fb when generating coercion, take into account the original type of the expression 2015-03-24 18:01:56 +01:00
Alexander Udalov 7e69a5ac9a Don't create KProperty instance for synthetic field
#KT-5759 Fixed
2015-03-23 16:30:26 +03:00
Alexander Udalov 9cf0720925 Fix KClass.simpleName for local classes 2015-03-23 16:30:24 +03:00
Alexander Udalov a4f9fe1eaa Filter out invisible fakes in KClass.properties
A user will rarely need those at the moment, and there's currently no other way
to let him filter out them by himself
2015-03-17 23:39:13 +03:00
Alexander Udalov d3abd54b06 Add 'val KClass.declaredProperties', make getProperties a property 2015-03-17 23:39:13 +03:00
Pavel V. Talanov 06916d98c6 default -> companion: replace all mentions of default and default object 2015-03-17 15:47:39 +03:00
Michael Bogdanov 11ce50f0d6 Tests for obsolete KT-6434: android compile error: local variable type mismatch
#KT-6434 Obsolete
2015-03-17 11:39:28 +03:00
Alexander Udalov 8af6ca5279 Delete kotlin.jvm.internal.KObject
It was supposed to be used in reflection but the benefits do not outweigh the
cost of KT-6951

 #KT-3223 Fixed
 #KT-6951 Fixed
2015-03-12 23:15:38 +03:00
Stanislav Erokhin a89b48c577 Backend support for function expression 2015-03-12 17:11:46 +03:00
Denis Zharkov f07566d30d Add warning for initializers with obsolete syntax
Expected 'init' keyword before class initializer
2015-03-11 17:45:26 +03:00
Alexander Udalov dc4dfbeec1 Fix generic class literals, substitute type parameters with stars 2015-03-11 16:42:47 +03:00
Alexander Udalov 6468515d99 Report error when LHS of class literal is not a class 2015-03-11 16:42:45 +03:00
Alexander Udalov b93b9bd565 Support KClass.simpleName and built-in class literals 2015-03-11 16:42:43 +03:00
Alexander Udalov 6e45c6f17c Support class literals (A::class) 2015-03-11 16:42:41 +03:00
Alexander Udalov b3cdd818f0 Support member extension properties, implement KClass.getExtensionProperties()
#KT-6570 Fixed
2015-03-11 16:42:38 +03:00
Alexander Udalov da209e673c Implement KClass.getProperties()
#KT-6570 In Progress
2015-03-11 16:42:37 +03:00
Alexander Udalov ff0044f66a Use descriptors for reflection on extension properties 2015-03-11 16:42:34 +03:00
Alexander Udalov 1a618deeab Use descriptors for reflection on top level properties
This also allows to obtain a Field object from the package part (see
mapping.kt)
2015-03-11 16:42:33 +03:00
Alexander Udalov 64fdb18ad3 Use descriptors for reflection on class properties
- use ConcurrentHashMap as a cache of class loaders to module descriptors
- KClassImpl now has a lazy class descriptor and it manages property creation
  by looking (also lazily) for the property descriptor in the corresponding
  scope
- since deserialized descriptors have full information about where a JVM symbol
  is located and what signature it has, new tests will begin to pass where
  Kotlin model and Java reflection model differ, see classObjectVar.kt
2015-03-11 16:42:31 +03:00
Alexander Udalov a8046020fb Rename kotlin.reflect.IllegalAccessException -> IllegalPropertyAccessException
The former name clashes with java.lang.IllegalAccessException and proved to be
inconvenient because it should always be qualified in the source.

Also use java.lang exception's message as kotlin.reflect exception's message
2015-03-07 02:32:15 +03:00
Pavel V. Talanov 59f192ef90 Replace 'class object' with 'default object' in renderers and test data
Includes changes to decompiled text
Old syntax is used in builtins and project code for now
2015-03-06 19:36:54 +03:00
Dmitry Jemerov c029fa2ed0 add test for generating annotations on the setter of a delegated property; (KT-4169); properly generate backing field for delegated property with a setter 2015-03-05 19:04:18 +03:00
Dmitry Jemerov 2835459920 correctly generate 'in' expressions with IntRange on RHS and a type other than Int on LHS 2015-03-05 11:33:24 +01:00
Nikolay Krasko 30a50746b5 Intrinsic default objects implementation: tests 2015-03-05 01:30:38 +03:00
Dmitry Jemerov 46e0fdc067 regression test for KT-3442 2015-03-04 17:41:27 +01:00
Pavel V. Talanov ffabe19229 Prohibit accessing nested classes/objects of class object using class literal
The fqname of class should be clear from code
Example: can't shorten A.Default.B.Default.C to A.B.C
Also fixes problem when nested class of enum class could be accessed via enum entry
2015-03-03 13:04:29 +03:00
Pavel V. Talanov cceb5738c8 Can't omit default object name in imports and types
There should be only one way to denote a type (A.Default.B can't be denoted as A.B)
2015-03-03 13:04:28 +03:00
Alexander Udalov 2c0830b017 Change synthetic accessor method names to "access$..."
As per discussion in https://youtrack.jetbrains.com/issue/KT-6870
2015-02-27 20:30:51 +03:00
Pavel V. Talanov a1f4c06a49 Update test data that mentioned old JvmAbi constants 2015-02-16 15:38:34 +03:00
Alexander Udalov 9b28e19551 Use CodegenContext to determine outer class & enclosing method 2015-02-11 18:10:49 +03:00
Alexander Udalov c417d984c4 Minor, move tests under common directory 2015-02-11 18:10:46 +03:00
Alexander Udalov 32c371dd41 Minor, uncomment previously failing checks
#KT-5092 Fixed
2015-02-11 18:10:44 +03:00
Alexander Udalov e7a744b315 Make JetTypeMapper aware of SAM constructor arguments
This obsoletes 'replaceName' workaround that was present in ClosureCodegen but
missing in other crucial call sites of mapSignature, e.g. generation of
EnclosingMethod info

 #KT-6691 Fixed
2015-02-11 18:10:41 +03:00
Alexander Udalov ae6ffeb88a Skip inlined lambdas when determining EnclosingMethod
#KT-6368 Fixed
2015-01-20 21:02:57 +03:00
Alexander Udalov baea660a0b Rewrite hack in codegen for lambdas in anonymous object super calls
Synthetic ClassDescriptor created in codegen for lambdas and such should have
correct container, because it'll be used in generation of InnerClasses
2015-01-16 21:48:57 +03:00
Denis Zharkov 5675d2b26b Dead code elimination
#KT-6602 Fixed
 #KT-6305 Fixed
 #KT-5656 Fixed
2015-01-15 15:13:05 +03:00
Alexander Udalov f3b2193afd Delete traces of "jet" in test data and unimportant code 2015-01-13 15:02:16 +03:00
Alexander Udalov 7f90dc3934 Regenerate tests 2015-01-03 00:20:28 +03:00
Denis Zharkov 04e560bc74 Get reified signature from JetTypeMapper
#KT-6485 Fixed
2014-12-18 21:12:52 +03:00
Andrey Breslav 120c344f11 Fix access to private static native functions 2014-12-16 16:23:35 +03:00
Andrey Breslav 6916c0f5cc Test for native property accessors 2014-12-16 16:23:34 +03:00