Commit Graph

2771 Commits

Author SHA1 Message Date
Svetlana Isakova aa26db0538 Updated tests for control flow: call instruction stores call element
instead of callee expression
2014-07-08 14:57:38 +04:00
Svetlana Isakova 72e9822d99 All RESOLVED_CALL getters replaced with util methods
JetElement.getResolvedCall(BindingContext)
  JetElement.getResolvedCallForSure(BindingContext)
2014-07-08 14:57:37 +04:00
Svetlana Isakova ae8757f6b8 Added tests on resolved call for 'this' 2014-07-08 14:48:20 +04:00
Svetlana Isakova 48511206ad Mark required call with 'caret' in abstract resolved calls test 2014-07-08 14:48:19 +04:00
Svetlana Isakova 29ab166e1b Refactoring: AbstractResolvedCallsTest
Render resolved call to a separate file
2014-07-08 14:48:19 +04:00
Svetlana Isakova b2c2e1811c Check 'isDirty' for resolved calls replaced with check 'hasUnresolvedArguments' for call
Don't report 'cannotCompleteResolve' error if some arguments are unresolved (like 'ambiguity')
2014-07-08 14:48:19 +04:00
Svetlana Isakova a3e306b820 Update recorded type for argument in parentheses correctly 2014-07-08 14:48:18 +04:00
Svetlana Isakova f24442b90e Added ArgumentMatchStatus.MATCH_MODULO_UNINFERRED_TYPES 2014-07-08 14:48:17 +04:00
Svetlana Isakova 857aa76cff Added tests for argument mapping 2014-07-08 14:48:17 +04:00
Svetlana Isakova 11fbe375fa Logic of completing call rewritten in CallCompleter
Changed interface ResolutionResultsCache
2014-07-08 14:48:15 +04:00
Michael Bogdanov 6b34035455 Avoid exceptions in test setUp cause tearDown would not be invoked 2014-07-07 10:51:47 +04:00
Michael Bogdanov ce71c5abde Test update for new ONLY_LOCAL_RETURN diagnostic 2014-07-07 10:51:46 +04:00
Michael Bogdanov da01a11137 New diagnostic for non-local return annotation 2014-07-07 10:51:46 +04:00
Michael Bogdanov 8092717da4 Support non local return generation, support non local return inlining 2014-07-07 10:51:46 +04:00
Mikhael Bogdanov 02c6bdeaa3 Inline test data structure changed 2014-07-07 10:51:46 +04:00
Andrey Breslav caec40b3a8 Fix test data 2014-07-05 18:31:55 +04:00
Andrey Breslav 06d060d5de KT-4295 Wrong diagnostic about "weaken access privilege" when override properties in constructor
#KT-4295 Fixed
2014-07-05 17:47:00 +04:00
Pavel V. Talanov 245919d691 Use module to resolve annotation classes in AnnotationDescriptorLoader 2014-07-03 20:46:36 +04:00
Andrey Breslav 6422bafb7a More tests for synchronized() {} 2014-07-03 18:39:57 +04:00
Andrey Breslav 90690e0711 KT-4825 Implement "synchronized" properly via monitorenter/monitorexit
#KT-4825 Fixed
2014-07-02 22:05:45 +04:00
Alexander Udalov c0fc5cfb53 Disallow named arguments for SAM adapters
SAM adapters are Java functions, and named arguments are not allowed for Java
functions

 #KT-5022 Fixed
2014-07-02 20:35:31 +04:00
Alexander Udalov 36f7cc742f Introduce NoSuchPropertyException and IllegalAccessException
No new tests added because it's difficult to model a situation where a
::-access is allowed but the code throws these exceptions at runtime
2014-07-02 01:58:22 +04:00
Alexander Udalov bc8bce7ca1 Provide "toString" for reflection objects 2014-07-02 01:55:55 +04:00
Alexander Udalov c5d92cc03e Provide "equals" and "hashCode" for reflection objects 2014-07-02 01:55:55 +04:00
Alexander Udalov 704de8992e Support mapping between Java and Kotlin reflection objects 2014-07-02 01:55:55 +04:00
Alexander Udalov c575ad9fb0 Fix test, remove duplicate annotation
It started to fail only now because KClassImpl constructor is now loading
class' annotations (previously annotations weren't loaded by Java reflection)
2014-07-02 01:55:54 +04:00
Alexander Udalov a38a396a43 Remove default import "kotlin.reflect"
Basic reflection is usable without any imports (with :: literals)

This reverts commit 9503056dd5.
2014-07-02 01:55:53 +04:00
Alexander Udalov d32a02f21a Modify top-level/extension property hierarchy
- rename KTopLevelProperty to KTopLevelVariable
- create KTopLevelExtensionProperty, a subclass of KExtensionProperty
- create KTopLevelProperty, a superclass of KTopLevelVariable and
  KTopLevelExtensionProperty. (In the future, it will have a container of type
  KPackage.)
2014-07-02 01:55:53 +04:00
Alexander Udalov 1ad037f621 Fix KClassOrigin for non-Kotlin classes
Check against presence of KotlinClass annotation
2014-07-02 01:55:21 +04:00
Alexander Udalov a86cfdc5de Add some simple tests on HashPMap 2014-07-02 01:26:23 +04:00
Alexander Udalov 89d6f25fb6 Fix initialization order of KClass field and class object fields 2014-07-02 01:26:21 +04:00
Alexander Udalov e7f19c531a Support 'accessible' for reflected properties on JVM
Calls Java reflection's isAccessible/setAccessible
2014-07-02 01:26:20 +04:00
Alexander Udalov 1275c84f92 Fail with IllegalAccessException on :: reference to private property
Instead of mysterious NoSuchMethodException
2014-07-02 01:26:20 +04:00
Alexander Udalov a8e1de48b8 Support :: references to Java instance fields in codegen
#KT-1183 In Progress
2014-07-02 01:26:19 +04:00
Alexander Udalov 5ab83aad8a Support references to extension properties in JVM codegen
#KT-1183 In Progress
2014-07-02 01:26:19 +04:00
Alexander Udalov 461cce103b Support references to top level and member properties in JVM codegen
#KT-1183 In Progress
2014-07-02 01:26:19 +04:00
Alexander Udalov 59777e7df6 Generate "$kotlinClass"/"$kotlinPackage" reflection fields to every class
Some seemingly irrelevant tests were changed because now there's <clinit> in
almost every class and class initialization begins with executing it
2014-07-02 01:26:18 +04:00
Alexander Udalov aa4d6a4ea7 Support :: references to properties in frontend
#KT-1183 In Progress
2014-07-02 01:26:18 +04:00
Alexander Udalov 52dadfc264 Add test for obsolete issue
#KT-3311 Obsolete
2014-07-02 00:38:50 +04:00
Alexander Udalov aea230d677 Introduce black box with Java codegen tests
In contrast to "black box against Java", it supports cyclic dependencies
between Java and Kotlin sources in one test case
2014-06-26 20:57:40 +04:00
Alexander Udalov 09863445bb Rename tests: boxWithJava -> boxAgainstJava 2014-06-26 20:57:40 +04:00
Alexander Udalov a9b2fd964b Support nullable types on left-hand side of ::
#KT-1183 In Progress
2014-06-26 20:57:39 +04:00
Alexander Udalov e31f2cfa23 Make protected static visibility reach members in the same package 2014-06-26 20:57:39 +04:00
Alexey Sedunov f226d99d36 Pseudocode: Add valued instructions and unbound values to AbstractPseudoValueTest 2014-06-26 13:06:23 +04:00
Alexander Udalov ca219f9880 Beautify kotlinc -help output 2014-06-25 22:32:16 +04:00
Alexander Udalov 5e994778d1 Add test on "kotlinc-js -help" output 2014-06-25 22:32:15 +04:00
Alexander Udalov 2144088627 Don't output full compiler FQ name on -printArgs 2014-06-25 22:32:14 +04:00
Alexander Udalov f51e172570 Fix kotlinc command line usage information
Fix spelling, case, minor grammar
2014-06-25 22:32:14 +04:00
Nikolay Krasko d8490ce2a6 Don't parse entries if left brace absent in 'when' 2014-06-25 14:22:53 +04:00
Nikolay Krasko f36f1796d6 Fix recovery for 'for' expression 2014-06-25 14:22:53 +04:00