Commit Graph

6432 Commits

Author SHA1 Message Date
Denis Zharkov 7ee50e043c Use type constructor when finding findStaticallyKnownSubtype
See InnerClasses.testBareTypes
2015-11-13 14:47:29 +03:00
Denis Zharkov daed74f9b2 Fix supertypes consistency check
See testKt5508:
`inner class B<S> : A<B<S>>()` is effectively the same as
`A<T>.B<S> : A<A<T>.B<S>>` or `B<S, T> : A<B<S, T>>`.
The latter is because we add outer class parameters to inner type constructor.

The problem is that we treat type constructors of first TP of 'A'
and of second type parameter (copy) of 'B' just the same and report INCONSISTENT_TYPE_PARAMETER_VALUES.

So we supposse it's more correct to compare type parameter descriptors instead
2015-11-13 14:47:29 +03:00
Denis Zharkov deea0643ad Refine type arguments resolution and rendering
In case of type constructors captured parameters from outer classes

 #KT-5510 Fixed
 #KT-3112 Fixed
 #KT-6325 Fixed
 #KT-408  Fixed
 #KT-6337 Fixed
2015-11-13 14:47:28 +03:00
Denis Zharkov 990bd7e71d Correct parameters of inner's class type constructor
Now it contains copies of outer's class constructor parameters
They are appended just after real type parameters
2015-11-13 14:47:28 +03:00
Denis Zharkov d614adcd2a Obtain type parameters of constructor from containing class
Effectively this commit is just inlining of 'typeParameters' parameter
2015-11-13 14:47:28 +03:00
Denis Zharkov c9aa75259b Introduce ClassDescriptor.declaredTypeParameters
Should be a subset of type constructor's parameters
2015-11-13 14:47:28 +03:00
Denis Zharkov 57094954a3 Minor. Simplify control-flow blocks 2015-11-13 14:47:28 +03:00
Denis Zharkov b4b1d16134 Extract and cleanup 'resolveTypeForClass' and 'resolveTypeForTypeParameter' 2015-11-13 14:47:27 +03:00
Mikhail Glukhikh 2f4dbd2084 Code cleanup: get rid of unnecessary !! / ?. / as 2015-11-13 13:13:55 +03:00
Valentin Kipyatkov d829f585f7 Changes on code review 2015-11-11 01:26:20 +03:00
Valentin Kipyatkov 80a788cf53 Code transformation 2015-11-11 01:26:20 +03:00
Stanislav Erokhin a3b11f4214 Created warning for KT-9805
#KT-9805 In Progress
2015-11-11 01:26:20 +03:00
Nikolay Krasko 2dd2a8dd65 Forgotten rename for in *.flex files after jet->kt rename 2015-11-10 20:46:17 +03:00
Mikhail Glukhikh 0d35033106 Introduction of CastedClassReceiver and its handling in codegen #KT-6744 Fixed
ClassReceiver converted to Kotlin
Also #KT-7617 Fixed
2015-11-10 20:20:51 +03:00
Valentin Kipyatkov 8942780640 KtCodeFragement to implement getImportDirectives() correctly 2015-11-10 17:26:19 +03:00
Alexey Sedunov 6ff955b66c Change Signature: Implement improved call processing algorithm
#KT-8953 Fixed
 #KT-9525 Fixed
2015-11-10 16:47:48 +03:00
Dmitry Jemerov e64a270d1a more renames to get rid of "Jet" in class and method names 2015-11-09 19:07:11 +01:00
Mikhail Glukhikh b468d5b0c6 No smart casts to Nothing? 2015-11-09 16:36:37 +03:00
Mikhail Glukhikh 2d9fbf5696 Always null detection 2015-11-09 16:36:34 +03:00
Valentin Kipyatkov 06812aed11 Better completion for static members: special behavior in case of imports from same class exist 2015-11-09 15:37:44 +03:00
Valentin Kipyatkov ca437e51c4 Initial implementation of KT-8209 Support static member completion without writing the class name 2015-11-09 15:37:44 +03:00
Mikhail Glukhikh 873550b0bb lateinit setter now must have the same visibility as its property visibility 2015-11-06 13:34:00 +03:00
Mikhail Glukhikh b556037915 Smart casts to nothing after comparison with null 2015-11-06 10:57:06 +03:00
Michael Nedzelsky 3dbb117598 fix KT-7042 Providing return type for property setter is not reported as error
#KT-7042 Fixed
2015-11-06 06:32:20 +03:00
Michael Nedzelsky e6a2bd05d4 fix KT-9652 Warning to specify expected type as Any? when it is already Any?
#KT-9652 Fixed
2015-11-06 06:32:07 +03:00
Michael Nedzelsky c318a13e6c Error on using extension function type as an upper bound 2015-11-06 06:31:52 +03:00
Ilya Gorbunov f3ff2e2e76 Replace deprecated join with joinToString 2015-11-06 01:12:00 +03:00
Stanislav Erokhin 55157df3eb Removed MemberScope.ownerDescriptor 2015-11-06 00:01:35 +03:00
Stanislav Erokhin 22f78b148c Removed usages of MemberScope.ownerDescriptor property. 2015-11-06 00:01:34 +03:00
Stanislav Erokhin b3e69a5f5d Created common supertype for HierarchicalScope and MemberScope-- ResolutionScope 2015-11-06 00:01:30 +03:00
Stanislav Erokhin c4582d0e0c Replace function MemberScope.getContainingDeclaration() to property ownerDescriptor 2015-11-06 00:01:30 +03:00
Valentin Kipyatkov 52dc23012f Changed parsing of object and enum entries to drop "KtObjectDeclarationName" 2015-11-05 23:21:22 +03:00
Valentin Kipyatkov 58fc0b6ec8 Fixed special item after "super." not working for fake override super 2015-11-05 17:47:55 +03:00
Mikhail Glukhikh 5e9aa38950 More precise type handling for equality #KT-2311 Fixed 2015-11-05 17:29:34 +03:00
Stanislav Erokhin 2c3f58eeb7 Renamed methods in MemberScope from getSmth to getContributedSmth 2015-11-05 14:34:00 +03:00
Stanislav Erokhin 6f9d9759ce Renamed KtScope to MemberScope 2015-11-05 14:34:00 +03:00
Zalim Bashorov c456ab0f74 Minor: refactoring ExpressionTypingUtils#checkVariableShadowing -- inline the search older descriptor 2015-11-04 22:15:39 +03:00
Stanislav Erokhin a90ca14033 Removed KtScope.Empty and created util function emptyScope 2015-11-04 14:28:28 +03:00
Stanislav Erokhin 4e891a3f98 Minor. moved util method to Companion of LexicalScope 2015-11-04 14:28:27 +03:00
Stanislav Erokhin 2c7746cafd Minor. Simplified code. 2015-11-04 14:28:27 +03:00
Stanislav Erokhin b02da0dc2f Created custom LexicalScope wrapper for resolving callable reference. 2015-11-04 14:28:26 +03:00
Stanislav Erokhin f7629b0c84 Removed getAllDescriptors() and getOwnDeclaredDescriptors() from KtScope 2015-11-04 14:28:25 +03:00
Stanislav Erokhin 0b5de434fa Removed usages KtScope.getAllDescriptors 2015-11-04 12:41:34 +03:00
Stanislav Erokhin 21fdd2ffc3 Created common supertype for LexicalScope & ImportingScope -- HierarchicalScope 2015-11-04 12:41:33 +03:00
Stanislav Erokhin 4c36e20242 Moved FilteringScope to frontend module 2015-11-04 12:41:32 +03:00
Stanislav Erokhin 6412df2e0b Change return type of KtScope.getProperties() 2015-11-04 12:41:32 +03:00
Stanislav Erokhin 7cd667c0e3 Removed unused methods from KtScope. 2015-11-04 12:41:31 +03:00
Stanislav Erokhin cc56cf6292 Removed several hacks from ScopeUtils.kt 2015-11-04 12:41:30 +03:00
Stanislav Erokhin 711daa459a Minor. Removed util method LexicalScope.asKtScope() 2015-11-04 12:41:30 +03:00
Stanislav Erokhin 40146a0df8 Minor. Make WritableScopeStorage abstract class 2015-11-04 12:41:29 +03:00