Commit Graph

4737 Commits

Author SHA1 Message Date
Alexander Udalov 64bc79aaac Fix safe calls codegen for nullable generic 2013-02-06 17:54:30 +04:00
Alexander Udalov 433660b2ce Fix codegen of !! for nullable generics 2013-02-06 17:54:29 +04:00
Alexander Udalov 75f09b7527 Fix codegen of as-casts for nullable generics 2013-02-06 17:54:28 +04:00
Alexander Udalov 70f67c7993 Fix elvis expression in case of nullable generic 2013-02-06 17:54:27 +04:00
Alexander Udalov 8697adb28a Fix generic data class hashCode for null
Null may come from everywhere, so we always check for it (when the property's
type is not primitive)
2013-02-06 17:54:26 +04:00
Alexander Udalov 1021ec5ff4 Add Intrinsics.areEqual()
It's more safe, short and less error-prone (especially w.r.t. nullability of
generic types)
2013-02-06 17:54:26 +04:00
max-kammerer 41b379497d revert of 59ede8b 2013-02-06 14:33:19 +04:00
max-kammerer 59ede8b979 Test for KT-2763 2013-02-06 14:15:24 +04:00
Leonid Shalupov bf33dd4091 Merge remote-tracking branch 'remotes/origin/remote-run/shalupov' 2013-02-06 14:00:02 +04:00
Leonid Shalupov a6468bdff1 fix tests 2013-02-06 13:16:38 +04:00
Alexander Udalov 1f4dd8cd33 Add CodegenUtil.isNullableType(), fix assertions
JetType.isNullable() is not accurate when the type denotes a type parameter:
a parameter can be not null (isNullable=false), but its upper bound can be
nullable (<T: Any?>), so null may appear in the value of such type. Therefore
it's preferred to use a special check (isNullableType()) in codegen from now on

Do not generate assertion for parameters of not-null types which have a
nullable upper bound + the same with Java method calls

Also fix Intrinsics class internal name in tests

 #KT-3313 Fixed
2013-02-05 21:52:29 +04:00
Andrey Breslav c296cbf6d1 Optimize super-interfaces 2013-02-05 21:34:09 +04:00
Andrey Breslav 2ae3dad92f Extract interface: PropertySetterDescriptor 2013-02-05 20:48:18 +04:00
Andrey Breslav d8258ef9fb Extract interface: PropertyGetterDescriptor 2013-02-05 20:47:56 +04:00
Andrey Breslav e09cba03cc Extract interface: PropertyAccessorDescriptor 2013-02-05 20:45:10 +04:00
Andrey Breslav e3cb79ce2e "--kotlinHome" command-line option 2013-02-05 20:30:32 +04:00
Wojciech Lopata 3930d2ca33 Not including empty testcases in suite.
That was sometimes resulting with IDE displaying incorrect number of tests in single run.
2013-02-05 17:55:37 +04:00
Alexander Udalov 8eb6047972 Fix assertions generation for substituted members 2013-02-05 16:26:56 +04:00
Andrey Breslav 4b96911b37 @NotNull for parameter of substitute() 2013-02-04 21:25:18 +04:00
Andrey Breslav 21eef960b5 Extract PropertyDescriptor interface 2013-02-04 21:22:54 +04:00
Evgeny Gerashchenko 658dbda6d4 Regenerated injectors. 2013-02-04 16:16:10 +04:00
Evgeny Gerashchenko d08466d265 Removed redundant 'out' in MutableMap.putAll 2013-02-04 16:16:10 +04:00
Evgeny Gerashchenko 10df80feda Minor. Extracted method. 2013-02-04 16:16:09 +04:00
Evgeny Gerashchenko c09c85e862 Minor. Simpler code. 2013-02-04 16:16:08 +04:00
Evgeny Gerashchenko 25dc5b5991 Checking redundant projections in jdk annotations. 2013-02-04 16:16:08 +04:00
Evgeny Gerashchenko 4be1e7d8d8 Checking redundant/conflicting projection kind in alt signatures. 2013-02-04 16:09:14 +04:00
Alexander Udalov 4ca522bf0e Fix codegen of do-while condition
The condition of a do-while loop can use variables declared in the loop
(variables can only be declared inside a block). Previously this behaviour
caused crash because after the block was generated, all variables declared
inside that block were gone from myFrameMap

 #KT-3280 Fixed
2013-02-04 15:30:38 +04:00
Alexander Udalov 2a4f06e32d Make the exception message in JvmClassName helpful 2013-02-04 15:27:31 +04:00
Alexander Udalov 7716feee71 Fix NPE in JetPsiUtil (EA-43298) 2013-02-04 15:27:30 +04:00
Nikolay Krasko 54e5fa5256 Imports resolution tests 2013-02-04 14:23:26 +04:00
Nikolay Krasko e69acd9198 JetPsiBuilder -> JetImportsFactory rename 2013-02-04 14:23:25 +04:00
Nikolay Krasko d4e3a4f74d Tests added for checking two-phase (classes and functions) import resolution 2013-02-04 14:23:22 +04:00
Nikolay Krasko ee227f01b9 Add test for checking ambiguity for root package and the same package 2013-02-04 14:23:21 +04:00
Nikolay Krasko f2e78d9064 Create scope with lazy import resolve 2013-02-04 14:23:21 +04:00
Nikolay Krasko 69f699e6a1 Create enumeration LookupMode instead of using boolean onlyClasses 2013-02-04 14:23:20 +04:00
Nikolay Krasko 73785e74bc Debug names for chained scopes in lazy resolve 2013-02-04 14:23:19 +04:00
Nikolay Krasko 6141d0305a Test for ImportPath and JetImportDirective coherence 2013-02-04 14:23:18 +04:00
Nikolay Krasko 70ce304c93 Store alias name with import path 2013-02-04 14:23:17 +04:00
Nikolay Krasko 83bc8d4f21 Centralize and cache creating import directives 2013-02-04 14:23:16 +04:00
Nikolay Krasko 8b60b07cc5 Refactoring: remove warnings 2013-02-04 14:23:15 +04:00
Nikolay Krasko 2ec9e10f14 Refactoring: reuse method, remove warnings, don't process descriptors substituted to null twice 2013-02-04 14:23:15 +04:00
Nikolay Krasko 9b807a6c30 Refactoring: move AbstractScopeAdapter to scope package 2013-02-04 14:23:14 +04:00
Nikolay Krasko c5de948cd3 Refactoring: remove warning 2013-02-04 14:23:13 +04:00
Nikolay Krasko 846d8f65e0 Refactoring: use delegation instead of subclassing 2013-02-04 14:23:12 +04:00
Andrey Breslav 79e27f2d90 Write vararg flag on value parameters 2013-01-31 22:05:56 +04:00
Evgeny Gerashchenko e1b7126ae3 Replaced variance with projection kind. 2013-01-31 21:33:43 +04:00
Evgeny Gerashchenko d0b18287c8 Removed redundant 'out' in MutableMap.putAll 2013-01-31 21:33:43 +04:00
Evgeny Gerashchenko 74771cb2db KT-3302 Method that implements two differing interfaces are reported as "Incompatible types in superclasses"
#KT-3302 fixed
2013-01-31 21:33:42 +04:00
Evgeny Gerashchenko 0f401d4c9d Minor. Simplified code. 2013-01-31 21:33:42 +04:00
Alexander Udalov 2e64aac788 Add regression test for KT-3132
#KT-3132 Obsolete
2013-01-31 20:59:16 +04:00