Commit Graph

6615 Commits

Author SHA1 Message Date
Natalia.Ukhorskaya 78d22e9f81 KT-2823 TypeCastException has no message
#KT-2823 Fixed
2012-10-11 15:41:49 +04:00
Alexander Udalov e869568196 Generate bridges for property accessors
Use existing FunctionCodegen.generateBridgeIfNeeded() on property getters &
setters

 #KT-2920 Fixed
2012-10-09 16:36:24 +04:00
Alexander Udalov c9984c3d06 Generate not-null assertions on method parameters
Intrinsics.checkParameterIsNotNull() gets its caller's class and method names
from the stack trace to render them in an exception message.

Fix codegen tests because now it's now allowed to pass null to non-null
argument in tests
2012-10-08 19:13:20 +04:00
Alexander Udalov bf779b4ca5 Generate not-null assertions only for descriptors coming from Java
Introduce BindingContext.IS_DECLARED_IN_JAVA, store that info in
JavaDescriptorResolver
2012-10-08 19:03:29 +04:00
Alexander Udalov fcbc95bbb4 Generate not-null assertions after getting a field 2012-10-08 14:11:57 +04:00
Alexander Udalov 95ec2448eb Generate not-null assertions after method calls
If a method comes from Java and is annotated as returning NotNull, after
calling it we should check if it actually returned something other than null.
Introduce checkReturnedValueIsNotNull() in jet/runtime/Intrinsics which does
exactly that.

CallableMethod's invoke() and invokeDefault() are now private, use asserted
versions instead
2012-10-08 14:11:56 +04:00
Pavel V. Talanov 90ce15d96f Modify test for KT-1515 to actually test using javaClass in another package as stated in the request.
NOTE: not 100% that this test actually covers the corresponding fix by Alex Tkachman.
2012-10-01 16:14:40 +04:00
Alexander Udalov acf8702ccf KT-2822 Can't make a super call from an object literal
#KT-2822 Fixed
2012-09-27 16:30:58 +04:00
Andrey Breslav 92ac865c72 KT-2819 Duplicate toString() method generated in data class
#KT-2819 Fixed
2012-09-26 12:32:16 +04:00
Kirill Berezin 194ef38ba3 KT-2477 fake overrides now get INHERITED visibility in order to maximize visibility according to inherited traits\classes 2012-09-25 19:17:55 +04:00
Natalia.Ukhorskaya 32d707ca9b Inner Java Enums
KT-2691 Fixed
 KT-2686 Fixed
2012-09-24 12:33:58 +04:00
Alex Tkachman be09227569 generation of inner classes inside object literal. #KT-2607 fixed
on the way ClassCodegen and MemberCodegen refactored out and injectors regenerated
2012-09-20 17:57:07 +03:00
Alex Tkachman 00d7a0a8ae test case for KT-2655 which duplicates KT-2786 2012-09-20 17:54:40 +03:00
Alex Tkachman 242ee38606 generic signatures for properties #KT2677 fixed 2012-09-20 17:54:40 +03:00
Alex Tkachman eaf9a79420 correct handling of delegate properties #KT-2786 fixed 2012-09-20 17:54:40 +03:00
Alexander Udalov dadc97d29f Fix maven build
Do not create class objects for classes which come from Java.
2012-09-20 18:10:19 +04:00
Alexander Udalov 37fd9cea08 Place inner enum into its parent's class object
#KT-2771 In Progress

ClassifierCollector now collects all enum declarations inside non-static
classes. After all declarations are done, it processes these enums: creates
a class object if it's not present, reports errors on each enum if a class
object is not allowed, and puts every enum into this class object otherwise,
recording this fact to trace.
2012-09-20 15:02:13 +04:00
Svetlana Isakova b081615e59 added tests for collections 2012-09-20 14:42:39 +04:00
Alex Tkachman b022eec0fa call correct methods String.valueOf/StringBuilder.append in case of byte/short. #KT-2794 fixed 2012-09-20 11:46:40 +03:00
Alex Tkachman 3dd9c6ab10 {} replaced by () in data classes toString 2012-09-19 13:50:50 +03:00
Andrey Breslav 5eaa5b396b Removing usages of tuples from test data
(KT-2358 Drop tuples)
 #KT-2358 In progress
2012-09-18 20:27:09 +04:00
Andrey Breslav dee5152f9b Supporting Unit.VALUE, to replace #()
#KT-2358 In Progress
2012-09-18 20:27:09 +04:00
Alex Tkachman 7b066faa9f changed behavior of componentX/toString/hashCode and equals to work naturally with overriden properties 2012-09-18 18:08:16 +03:00
Alex Tkachman ae93018546 fix for several (unlikely all) closely related problems with handling of byte/short/char on Delvik #KT-2251 fixed 2012-09-18 16:53:55 +03:00
Alex Tkachman 0ffc8f355b attempt to fix KT-2251 2012-09-18 14:25:09 +03:00
Alex Tkachman 8e463ac0ac equals generation for data classes 2012-09-17 18:48:17 +03:00
Evgeny Gerashchenko 6e62212727 Replaced sure() invocations with '!!' operator in codegen tests. 2012-09-17 18:00:21 +04:00
Alex Tkachman 8c823486d7 hashCode generation for data classes 2012-09-17 15:52:23 +03:00
Alex Tkachman a4e272d7c6 optimization of toString for primitive types and "$expr"
- intrinsic toString for promitive types added to stdlib
- utility method added to CodegenUtil
- optimization logic added to generation of interpolating string
2012-09-17 13:00:02 +03:00
Alex Tkachman 3b96624c81 small optimizaton of toString for primitive types (no boxing needed) 2012-09-17 09:07:08 +03:00
Alex Tkachman 58af365eb2 toString() method for data classes and fake implementation for hashCode/equals 2012-09-16 15:56:48 +03:00
Alex Tkachman e317764a88 correct access flags for package private (coming from java) #KT-2781 fixed 2012-09-16 10:08:36 +03:00
Natalia.Ukhorskaya c5db89e534 Generated field for classObject is now final
EA-38323 Fixed - Illegal field modifiers in class
2012-09-14 16:41:13 +04:00
Evgeny Gerashchenko c33b880a57 EA-39177 - CCE: ArrayIterator.generate
If local variable is auto-casted to array, it should be iterated as array.
2012-09-14 16:12:16 +04:00
Svetlana Isakova 0d1790a4f4 alternative signature applies for names
mapped in standard library (and differs from auto transformed Java signature)
e.g.Collections.copy(MutableList, List)
2012-09-13 17:28:31 +04:00
Alex Tkachman a8627a56ef test for obsolete KT-2663 2012-09-13 16:28:00 +03:00
Alex Tkachman 0a2f808ec0 test case and fixes for object and classes inner for enum entry 2012-09-12 20:48:12 +03:00
Alex Tkachman ca65574bce no need for context lookup of enclosing singletons #KT-2695 fixed 2012-09-12 19:41:26 +03:00
Alex Tkachman 6c4102bf23 simple case (no closures) of class level objects #KT-2398 fixed 2012-09-12 17:35:51 +03:00
Alex Tkachman 79c04038fb accessor for private constructors #KT-2716 fixed
also on the way done small refactoring of JetTypeMapper
- few code duplicates replace by methods
- mapToCallableMethod(ConstructorDescriptor) introduced
2012-09-12 10:31:48 +03:00
Alex Tkachman 6a0e4d1593 name clash when several files of the same package has different paths but the same name #KT-2713 Fixed 2012-09-11 17:05:23 +03:00
Alex Tkachman ec549895e8 fix for NPE when lookup names in objects/closure in constructors #KT-2719 Fixed 2012-09-11 16:16:09 +03:00
Alex Tkachman 4eea0cafb9 test for obsolete KT-2626 2012-09-11 15:51:16 +03:00
Alex Tkachman 53f145b533 optimization of delegates by val property 2012-09-08 09:34:02 +03:00
Alexander Udalov 2c84389a45 Codegen for "componentN" functions for data classes 2012-09-07 19:00:02 +04:00
Andrey Breslav b46187a560 KT-2739 Error type inferred for hashSet(Pair, Pair, Pair)
#KT-2739 Fixed
2012-09-07 18:24:22 +04:00
Andrey Breslav 7b01ce5acb Test for KT-2532 Exception on trying to override delegated member.
#KT-2532 Fixed
2012-09-07 14:49:02 +04:00
Kirill Berezin 6e951685de KT-2657 Fixed incorrect stack values order in delegation methods codegen #KT-2657 Fixed 2012-09-06 23:54:14 +04:00
Kirill Berezin 82a5beddea do not copy overrides for the delegated methods, it causes failure of delegation to traits which extend other traits 2012-09-06 20:27:43 +04:00
Kirill Berezin 1061e1ef69 do not generate delegates when the class already has such method either declared or delegated (report an ambiguity in this case)
Merge conflict resolved by committer
2012-09-06 20:27:43 +04:00