Commit Graph

28025 Commits

Author SHA1 Message Date
Mikhail Glukhikh 04569dd4af Rename: ExpressionOrImplicitClassReceiver ---> ThisClassReceiver 2015-11-17 13:02:19 +03:00
Mikhail Glukhikh 59e54d1db1 Rename: ThisReceiver ---> ImplicitReceiver 2015-11-17 13:02:16 +03:00
Mikhail Glukhikh 7ba297db81 ThisReceiver converted to Kotlin 2015-11-17 13:02:12 +03:00
Mikhail Glukhikh ffb67eb79e Code cleanup 2015-11-17 13:02:09 +03:00
Mikhail Glukhikh f1034dbf19 Receiver refactoring in DataFlowValueFactory 2015-11-17 13:02:06 +03:00
Dmitry Jemerov e56b898a53 Merge pull request #785 from belovrv/patch-1
Add Slack badge
2015-11-17 10:50:54 +01:00
belovrv 3c138aa01c Add Slack badge 2015-11-17 12:49:22 +03:00
Mikhail Glukhikh 96c303be60 Smart cast of value / implicit receiver: two different colors 2015-11-17 10:26:46 +03:00
Mikhail Glukhikh 811ba8110f Implicit receiver smart casts implementation and highlighting 2015-11-17 10:26:42 +03:00
Mikhail Glukhikh 03287d5d66 Diagnostics corrected for smart cast impossible 2015-11-17 10:26:26 +03:00
Stanislav Erokhin b4fe62e53e Minor. rename getObjectType to getCompanionObjectType 2015-11-17 01:25:18 +03:00
Stanislav Erokhin c7f7ba72b8 Moved logic for PRIVATE_TO_THIS visibility from ExpressionTypingUtils.normalizeReceiverValueForVisibility to ExpressionReceiver.create 2015-11-17 01:25:18 +03:00
Stanislav Erokhin 6b7bf63814 Minor. Split ExpressionReceiver to interface & implementation 2015-11-17 01:25:17 +03:00
Stanislav Erokhin 5a7e879c0c Convert ExpressionReceiver to kotlin. 2015-11-17 01:25:17 +03:00
Stanislav Erokhin 512bcbe7b9 Minor. Removed usage of ExpressionReceiver constructor from Qualifier.kt 2015-11-17 01:25:16 +03:00
Stanislav Erokhin 1c9136a8cd Minor. introduce method ExpressionReceiver.create and replace almost all usages of constructor ExpressionReceiver. 2015-11-17 01:25:15 +03:00
Stanislav Erokhin e606c0cdf5 Minor. Introduce ExpressionOrImplicitThisClassReceiver. 2015-11-17 01:25:14 +03:00
Michael Nedzelsky e5e4f9e775 Hack for checking access to internal declarations during incremental compilation 2015-11-17 00:26:43 +03:00
Valentin Kipyatkov 40bc30aee2 Fixed compilation after rebase 2015-11-16 18:29:55 +03:00
Valentin Kipyatkov 927df1c4cd KT-5072 Values of extension function type are not seen in completion
#KT-5072 Fixed
2015-11-16 18:24:37 +03:00
Valentin Kipyatkov 2e2dfcb4a0 "invoke" from function types do not have any meaningful parameter names 2015-11-16 18:24:37 +03:00
Valentin Kipyatkov 5b668cb6a6 KT-9970 Regression: completion doesn't see private extension functions with parametrized receiver
#KT-9970 Fixed
2015-11-16 18:24:37 +03:00
Valentin Kipyatkov 6a26e2fd82 Sorting overloads in completion 2015-11-16 18:24:37 +03:00
Alexey Sedunov ac8532ffce Quick Fixes: Implement 'Initialize with constructor parameter' quick-fix
#KT-6604 Fixed
2015-11-16 11:30:03 +03:00
Alexey Sedunov 138370ce5b Quick Fixes: Implement 'Move to constructor parameters' quick-fix
#KT-6604 In Progress
2015-11-16 11:30:02 +03:00
Alexey Sedunov f66af7bdd4 Quick Fixes: Implement 'Initialize property' quick-fix 2015-11-16 11:30:00 +03:00
Alexey Sedunov aeee8bafe6 Name Suggester: Suggest parameter name for the corresponding argument expression
#KT-8111 Fixed
2015-11-16 11:29:59 +03:00
Mikhail Glukhikh f21603daf2 Source code fix according to KT-4475 2015-11-16 10:55:15 +03:00
Mikhail Glukhikh fdd9eee849 DataClassAnnotationChecker --> DataClassDeclarationChecker 2015-11-16 10:45:58 +03:00
Mikhail Glukhikh dd43674426 Data class must have at least one argument is reported on constructor parameter list now, if any #KT-9999 Fixed 2015-11-16 10:45:54 +03:00
Mikhail Glukhikh 86c37deaee Overriden setter now cannot weaken visibility #KT-3369 Fixed 2015-11-16 10:45:21 +03:00
Mikhail Glukhikh 02fb19c3ea Inner classes are no more allowed inside enum entries #KT-9750 Fixed
Forbidden use-case deleted from codegen tests
2015-11-16 10:44:20 +03:00
Ilya Gorbunov 3f4430087e Do not call deprecated public getProgressionFinalElement, call internal getProgressionLastElement instead.
ProgressionIterators do not compute final element by themselves, but use one computed by Progression.
Update testdata for LoadBuiltinsTest
2015-11-13 21:38:22 +03:00
Ilya Gorbunov 96f301fdec Support only integer primitive ranges and progressions in optimized for loop codegen.
Do not call getProgressionFinalElement, use new progression properties 'first' and 'last' instead.
2015-11-13 20:58:18 +03:00
Ilya Gorbunov 5d4e72ed7f Correct deprecation replacement for Progression constructors.
Update testdata for LoadBuiltinsTest
2015-11-13 18:59:38 +03:00
Denis Zharkov e920ce709b Render captured type parameters in verbose mode 2015-11-13 14:59:04 +03:00
Denis Zharkov 6ae653e5a1 Implement stub building for inner types 2015-11-13 14:59:04 +03:00
Denis Zharkov 7500447e72 Implement serialization of inner types 2015-11-13 14:59:03 +03:00
Denis Zharkov 8cb85759c7 Fix written generic signature in case of inner types 2015-11-13 14:59:03 +03:00
Denis Zharkov eea898abb5 Introduce PossiblyInnerType class
Use it when rendering inner types, similar logic will be used in different subsystems
2015-11-13 14:58:58 +03:00
Denis Zharkov 9c8ad9e442 Fix AbstractWriteSignatureTest
It didn't check anything in tests with class signatures
2015-11-13 14:47:29 +03:00
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 188bcf0a03 Introduce TypeConstructorSubstitution.create
After latest changes type constructors of inner classes contains
additional type parameters that are copies of ones from outer class.

Their indices are correct, but they used only for subtyping check,
all entries within inner classes are still refers to original
descriptors having different indices.

Example:
class Outer<E> {
   inner class Inner<F> { // Inner's type constructor looks like Inner<F, E>
      fun foo(): E // refers to E in outer having index 0
   }
}

Indexed substitution does not work here because of intersecting indices,
so we replace it with common map substituion in such cases.
2015-11-13 14:47:29 +03:00
Denis Zharkov c57dbcc602 Fix substition of inner classes constructors
It should have substituted class as containing declaration
2015-11-13 14:47:28 +03:00
Denis Zharkov c5103f9ac4 Fix JavaClassifierType.getTypeArguments impls
Make them return arguments both for current classifier and for the outer one
2015-11-13 14:47:28 +03:00
Denis Zharkov 910718ff45 Weaken JvmRuntimeDescriptorLoaderTest assumptions
Sometimes descriptors in reflection may differ from compiled ones.
There is already SKIP_IN_RUNTIME_TEST but sometimes
it would be nice to record specific behaviour.

Solution is to add '.runtime.txt' near '.txt' files for tests containing
expected rendered descriptors in reflection.
2015-11-13 14:47:28 +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 7b4c0fb83a Use original type parameters for SAM adapter to constructor
It makes SAM descriptors more consistent with real ones
2015-11-13 14:47:28 +03:00