Commit Graph

32961 Commits

Author SHA1 Message Date
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 2ab0f489b5 Reflection: add KClassifier, KTypeParameter, KTypeParameter.name
The ability to obtain classifier from types is going to be added later
2016-08-08 17:54:11 +03:00
Alexander Udalov 5e3efe0e58 Reflection: improve support of built-in classes in 'toJavaClass'
Also support mock class descriptor created for java.io.Serializable. This will
be needed (and covered with tests) later for correct implementation of advanced
reflection API
2016-08-08 17:54:11 +03:00
Mikhail Glukhikh 0c98231f53 Report UNINITIALIZED_VARIABLE also for qualified object property #KT-12809 Fixed
(cherry picked from commit 7b2857f)
2016-08-08 17:48:08 +03:00
Mikhail Glukhikh 35446037bb UNINITIALIZED_ENUM_ENTRY compiler warning introduced #KT-2349 Fixed
(cherry picked from commit 76ac6d1)
2016-08-08 17:47:56 +03:00
Mikhail Glukhikh b7ed68db05 CFA: No more UNRESOLVED_CALL for object / enum entry qualifiers
(cherry picked from commit 4b09de8)
2016-08-08 17:47:40 +03:00
Mikhail Glukhikh 962c2e5dd2 ControlFlowInformationProvider: convert to Kotlin
(cherry picked from commit a1394bc)
2016-08-08 17:45:52 +03:00
Mikhail Glukhikh 16cf6379c1 ControlFlowInformationProvider.java --> ControlFlowInformationProvider.kt
(cherry picked from commit 28bb9ea)
2016-08-08 17:45:41 +03:00
Alexander Udalov de68d96236 Minor, add test for obsolete issue
#KT-12843 Obsolete
2016-08-08 15:42:52 +03:00
Valentin Kipyatkov 6ff91d1399 KT-12793 Code completion doesn't suggest abstract protected extension methods
#KT-12793 Fixed
2016-08-05 19:36:52 +03:00
Zalim Bashorov 88ad00b0bc JS backend: add the ability to get JS constructor function by class name and from instance. Support it for reified type parameters too. Add ability to get name of class.
#KT-5987 Fixed
 #KT-4115 Fixed
2016-08-05 18:13:05 +03:00
Zalim Bashorov e7eb35b169 JS backend: always (explicitly) generate constructor function for classes. Use name of class as name of constructor function when it isn't special.
#KT-4115 In Progress
2016-08-05 18:13:05 +03:00
Nikolay Krasko bfb4c48785 Minor: rename variables 2016-08-05 16:46:25 +03:00
Nikolay Krasko c137b0d740 Decrease xmx in tests 2016-08-05 16:46:23 +03:00
Nikolay Krasko bc0d302760 Use nullable value and destroy it in tearDown for REPL tests 2016-08-05 16:46:22 +03:00
Alexey Andreev 19cea48637 JS: add tests to show that #KT-12865 fixed as well 2016-08-05 16:32:27 +03:00
Alexey Andreev 4ff2b62bc0 KT-12864: add Comparable interface to Enum metadata so that RTTI should handle is Comparable case correctly 2016-08-05 16:32:27 +03:00
Michael Bogdanov 67808ef7fc Disable kt13133 test on android 2016-08-05 14:11:00 +03:00
Nikolay Krasko 300e0acd27 Report RETURN_NOT_ALLOWED and RETURN_IN_FUNCTION_WITH_EXPRESSION_BODY only on the return with label (KT-13340)
#KT-13340 Fixed
2016-08-05 13:16:05 +03:00
Mikhail Zarechenskiy 95ea191442 Fix handling after ScriptTest execution: clean up temporary files on exit hooks
Test "testStandardScriptWithSaving" uses classloader and prevents from
 deleting temporary files on windows
2016-08-04 15:19:15 +03:00
Mikhail Zarechenskiy 7679e49b25 Do not generate properties for script parameters if there is template definition 2016-08-04 15:19:15 +03:00
Alexey Tsvetkov e4226fbe48 Update changelog for 1.0.4 2016-08-04 11:27:08 +03:00
Natalia Ukhorskaya 7087f10660 Fixes after review: get last statement in codeFragmetn using psi instead of findElementAt 2016-08-03 17:51:49 +03:00
Natalia Ukhorskaya ed204e9bac Minor: extract similar parts to separate function 2016-08-03 17:51:49 +03:00
Natalia Ukhorskaya 6a04cd39b2 Debugger: allow to evaluate kotlin expressions in java files
#KT-7549 Fixed

 If the context is inside PsiJavaFile, get list of all local variables available in current frame (this logic was removed in 29778311e8 01.12.2015 Drop unnecesary logic about additional context for lambda in debugger). For each variable create KtProperty inside top-level KtFunction in KtFile and set it as contextElement for KtCodeFragment. This file should have all imports from PsiJavaFile. We do not create properties on top-level because they will be highlighted as top-level vals/vars.
2016-08-03 17:51:49 +03:00
Natalia Ukhorskaya d823d6f4ab Debugger tests: mark objects using NodeDescriptorImpl.getMarkup. Primitive values cannot be marked. 2016-08-03 17:51:49 +03:00
Pavel V. Talanov 252b8ec6db Add assertions to prohibit creating LazyJavaClassDescriptor by KtLightClass
Diagnosing KT-12966
2016-08-03 17:29:08 +03:00
Pavel V. Talanov 30892e0154 KtLightClassForDecompiledDeclaration is now marked by KtLightClassMarker
Rename: KtJavaMirrorMarker -> KtLightClassMarker
Introduce code to be able to tell light classes from source and binaries apart in 'frontend.java'
2016-08-03 17:29:06 +03:00
Alexey Tsvetkov d402a15049 Update changelog for 1.0.4 2016-08-03 15:09:20 +03:00
Alexey Tsvetkov e0ebf2482b Configure KotlinCompile.destinationDir before evaluation
Previously it was possible to refer to destinationDir
in gradle scripts (evaluation phase), so in order to
preserve compatibility destinationDir should be configured
before evaluation.

This does not affect android plugin because in this case kotlin
tasks were created after evaluation anyway, so it
was not possible to refer to destinationDir
during evaluation anyway.
2016-08-03 13:09:56 +03:00
Ilya Chernikov 1248230c69 Fix after review, add logging for scripting-specific behavior 2016-08-03 09:51:40 +02:00
Pavel V. Talanov fbc5d64aab gradleScriptTemplateProvider: fix NPE 2016-08-03 09:51:40 +02:00
Ilya Chernikov f73b8e80be Fixes after review 2016-08-03 09:51:40 +02:00