Alexander Udalov
5b1ee13db8
Make KClasses for primitives equal to KClasses for wrapper types
...
Both primitive int and wrapper type java.lang.Integer are represented by the
single type kotlin.Int in Kotlin, so inequality between the corresponding
KClasses was confusing here. To keep the old behavior, one may call 'k1.java ==
k2.java' instead of `k1 == k2`
#KT-13462 Fixed
2016-08-15 19:41:47 +03:00
Alexander Udalov
3efa738bc0
Fix NPE on .companionObjectInstance for built-in classes
...
#KT-13370 Fixed
2016-08-15 19:41:47 +03:00
Alexander Udalov
7f142253bf
Reflection: simplify KTypeProjection
2016-08-08 17:54:11 +03:00
Alexander Udalov
a7f4037206
Reflection: change order of arguments of inner generic type
...
As in KClassifier.createType and everywhere in the compiler, specify arguments
for the innermost type first. This is more convenient to use because generally
the construction/introspection of such type starts from the innermost class
anyway (i.e. something like generateSequence can be used, without the need to
call .reverse() in the end)
2016-08-08 17:54:11 +03:00
Alexander Udalov
89d69bc7eb
Reflection: add KClass.createInstance
2016-08-08 17:54:11 +03:00
Alexander Udalov
0525b1e6c1
Reflection: add KClass.declaredMembers
2016-08-08 17:54:11 +03:00
Alexander Udalov
30b7334e48
Reflection: add utilities to filter parameters by kind and name
2016-08-08 17:54:11 +03:00
Alexander Udalov
d78988a12a
Reflection: add KVisibility, KClass.visibility, KCallable.visibility
2016-08-08 17:54:11 +03:00
Alexander Udalov
7e317f7a7c
Reflection: add API for declaration modifiers
...
#KT-10447 Fixed
2016-08-08 17:54:11 +03:00
Alexander Udalov
ada81923dc
Reflection: add KClass.isInstance, KClass.cast, KClass.safeCast
...
#KT-11284 Fixed
2016-08-08 17:54:11 +03:00
Alexander Udalov
3702f4a7a7
Reflection: add KClass.{isSubclassOf,isSuperclassOf}, KType.{isSubtypeOf,isSupertypeOf}
...
The behavior in primitives.kt is likely to be reconsidered
#KT-8998 Fixed
2016-08-08 17:54:11 +03:00
Alexander Udalov
4cd252d9d5
Reflection: add KClass.{supertypes,superclasses,allSupertypes,allSuperclasses}
...
Some things are not implemented yet for allSupertypes, such as KType->Type
mapping of types and generic substitution of built-in types
2016-08-08 17:54:11 +03:00
Alexander Udalov
486ea62c72
Reflection: add KType.withNullability
2016-08-08 17:54:11 +03:00
Alexander Udalov
f958483e56
Reflection: deprecate KClass.defaultType
...
Its semantics were unclear and its javaType was implemented incorrectly (it
should have returned ParameterizedType with star projections for generic type)
2016-08-08 17:54:11 +03:00
Alexander Udalov
6b79782951
Reflection: add KClassifier.starProjectedType
...
#KT-8998 In Progress
2016-08-08 17:54:11 +03:00
Alexander Udalov
1edf3c7809
Reflection: add KClassifier.createType
...
#KT-8998 In Progress
2016-08-08 17:54:11 +03:00
Alexander Udalov
153e837a84
Reflection: add KType.jvmErasure
...
#KT-8998 In Progress
2016-08-08 17:54:11 +03:00
Alexander Udalov
e760b5ed53
Reflection: add KTypeParameter.toString
...
The test covers different type parameters with and without bounds, in case we
decide to also output upper bounds in toString
2016-08-08 17:54:11 +03:00
Alexander Udalov
170ea4dead
Reflection: add KVariance, KTypeParameter.{variance,upperBounds,equals,hashCode}
2016-08-08 17:54:11 +03:00
Alexander Udalov
127e7ab5b7
Reflection: add KClass.typeParameters, KCallable.typeParameters
...
Inheritance from KCallable is removed in kt9078.kt because it was irrelevant to
the test and because it gets in the way of modification of KCallable
2016-08-08 17:54:11 +03:00
Alexander Udalov
f69cc01f8e
Reflection: add KTypeProjection and KType.arguments
...
#KT-8998 In Progress
2016-08-08 17:54:11 +03:00
Alexander Udalov
c1dd831e65
Reflection: add KType.classifier
...
#KT-8998 In Progress
2016-08-08 17:54:11 +03:00
Alexander Udalov
0ea885ce58
Move tests on KClass.java* to box/classLiteral/java
...
Also replace WITH_REFLECT to WITH_RUNTIME to test that these cases correctly
work without reflection in the classpath
2016-07-26 13:48:19 +03:00
Alexander Udalov
3b349e9be0
Fix reflection on reference to generic property
...
See a93484b457 for the similar fix to function
references
#KT-12967 Fixed
2016-07-05 18:18:43 +03:00
Alexander Udalov
c07d0d48d3
Fix KCallable#callBy to JvmStatic companion object members
...
#KT-12915 Fixed
2016-06-30 19:41:47 +03:00
Alexander Udalov
311301f430
Check return type when locating method in reflection
...
#KT-11824 Fixed
2016-06-20 21:03:51 +03:00
Mikhael Bogdanov
ee7bbbf530
Fix for KT-12127: Undeclared type variable on delegated property backing field
...
#KT-12127 Fixed
2016-05-04 17:07:48 +03:00
Dmitry Petrov
e441f0509f
KT-11943 Do not use intrinsic 'java' property if receiver type is not acceptable
2016-04-19 10:31:30 +03:00
Dmitry Petrov
583733be8d
KT-11645 properly handle private property getter name mangling in reflection
2016-04-14 09:31:29 +03:00
Alexander Udalov
6924d883eb
Support reflection calls to multifile class members
...
#KT-11447 Fixed
2016-03-28 21:11:14 +03:00
Alexander Udalov
f8dfaf4599
Merge boxWithJava testData into box, delete BoxWithJava test
2016-03-09 10:25:38 +03:00
Alexander Udalov
16a0ddd2fb
Merge boxMultiFile testData into box, delete BoxMultiFile test
2016-03-09 10:25:38 +03:00
Alexander Udalov
06a67e6602
Merge boxWithStdlib testData into box, delete BoxWithStdlib test
2016-03-09 10:25:38 +03:00
Alexander Udalov
daab3db062
Add WITH_RUNTIME and WITH_REFLECT directives to box tests
...
Currently all tests in boxWithStdlib/ run with both runtime and reflection
included; eventually they'll be merged into box/ using these directives
2016-03-03 16:11:21 +03:00
Alexander Udalov
49004a8b8e
Conform functions to extension functions and vice versa
...
#KT-5989 Fixed
2015-05-26 15:04:56 +03:00
Alexander Udalov
4141e0a8df
Introduce fictitious numbered Function class descriptors
2015-05-26 15:04:54 +03:00
Stanislav Erokhin
3de0dff575
Migrate testdata to new lambda syntax
2015-04-07 13:08:53 +03:00
Alexander Udalov
41eb0deaa0
Introduce FunctionImpl and ExtensionFunctionImpl classes
...
Old FunctionImpl0,1,2,... will be dropped since they had no purpose
2014-05-19 19:50:58 +04:00
Alexander Udalov
f7b6457139
Replace "jet" package name with "kotlin" in testData
2014-03-02 19:55:26 +04:00
Alexander Udalov
5d6d4406cb
Move FunctionImpl classes from package "jet" to "kotlin"
2014-03-02 19:54:56 +04:00
Andrey Breslav
3071b58219
Use a built-in class to mitigate a naming problem in Android tests
2013-10-09 11:47:58 +04:00
Andrey Breslav
7f46d7555e
Do not write "? extends" and "? super" in immediate arguments of supertypes in Java generic signatures
2013-10-08 21:13:30 +04:00
Alexander Udalov
56f8f021f9
Generate proper generic signature for closure classes
2013-04-22 17:59:32 +04:00
Alexander Udalov
0ec1f20140
Write generic signature for closure FunctionN superclass
...
ClosureCodegen.appendType() now appends any Type as a type parameter correctly
2013-04-22 17:59:29 +04:00