Dmitry Petrov
1bbbc1ca1c
KT-16684 hashCode doesn't check data class property value of generic type for null
2017-03-07 11:56:52 +03:00
Dmitry Petrov
68fab55251
Minor: cleanup unused imports
2017-03-07 11:56:52 +03:00
Dmitry Petrov
6bc6c1b6cc
KT-16671 Calls to members imported from objects should be desugared in PSI2IR
2017-03-07 11:56:52 +03:00
Dmitry Petrov
4ba8268a29
KT-16669 Exception in PSI2IR on type alias constructor in supertypes list
2017-03-07 11:56:52 +03:00
Dmitry Petrov
e4683a1e9f
KT-16666 IMPLICIT_INTEGER_COERCION expression should have non-nullable type
2017-03-07 11:56:52 +03:00
Dmitry Petrov
8c32719f3d
Render 'type' for IrTypeOperatorCall expressions, update testData.
2017-03-07 11:56:52 +03:00
Dmitry Petrov
b3aeddac85
Refactor: generalize postfix order transformation in InsertImplicitCasts
2017-03-07 11:56:52 +03:00
Dmitry Petrov
8e8f83656f
KT-16618 IMPLICIT_INTEGER_COERCION isn't generated for global properties and default parameters
2017-03-07 11:56:52 +03:00
Alexey Andreev
ef38761dc2
JS: unmute now passing tests and mute test that passed by accident.
2017-03-07 10:46:09 +03:00
Alexey Andreev
8567db10b5
JS: fix coroutine transformation of callable references to local functions. See KT-16164
2017-03-07 10:46:07 +03:00
Dmitry Petrov
18fb70b32f
Potential fix for KT-16673
...
See also:
http://stackoverflow.com/questions/42571812/unsupportedoperationexception-while-building-a-kotlin-project-in-idea
'original' for SamAdapterFunctionScope.MyFunctionDescriptor#doSubstitute should exactly match 'this.original',
so we can just provide it by default in SamAdapterFunctionScope.MyFunctionDescriptor#newCopyBuilder.
2017-03-06 22:00:09 +03:00
Ilya Chernikov
50e7973fc0
Implement verification workaround for annotation-like class InvalidScriptResolverAnnotation
...
fixes #KT-16621
2017-03-06 16:31:52 +01:00
Mikhael Bogdanov
ff9fe85507
Fix for KT-16614: Report inability to inline 1.8 bytecode into 1.6 bytecode as an error, no as an exception
2017-03-06 15:15:22 +01:00
Alexander Udalov
0111c4d581
Allow references to nested class constructors in objects in LV = 1.0
...
#KT-16598 Fixed
2017-03-06 11:03:24 +03:00
Alexander Udalov
7c22113c34
Refactor serialization of package FQ name extension
...
Instead of requiring to pass it in SerializerExtensionBase's
constructor, pass it always in serializePackage. This is more
straightforward and helps in a situation where one SerializerExtension
instance is used for the whole module, not one per-package
2017-03-06 11:03:24 +03:00
Ilya Chernikov
e3391175d9
Rewrite parallel daemon start test to make it tougher but more robust
2017-03-05 11:29:54 +01:00
Anton Bannykh
fcffd190d0
JS: prohibited extension function arguments in external functions; removed extension receiver in jQuery declarations.
2017-03-03 20:37:59 +03:00
Alexander Udalov
25c1828288
JS: write and load pre-release flag on binaries
2017-03-03 13:33:51 +03:00
Alexander Udalov
de8dd37e44
Change DeserializedContainerSource.presentableFqName to String
...
To allow outputting something other than "Class 'XXX'" in the diagnostic
message for declarations deserialized from JS
2017-03-03 13:33:51 +03:00
Alexander Udalov
b52b90c182
Extract serialization of packageFqName extension to SerializerExtensionBase
2017-03-03 13:33:51 +03:00
Alexander Udalov
3cb8f1ab20
Drop BuiltIns protobuf message, use ProtoBuf.PackageFragment instead
2017-03-03 13:33:50 +03:00
Alexander Udalov
2b1b1fb0d4
Merge VirtualFileKotlinClassFinder into VirtualFileFinder
...
VirtualFileKotlinClassFinder was the only direct subclass of VirtualFileFinder
2017-03-03 13:33:50 +03:00
Alexander Udalov
abb5bc6aba
Simplify VirtualFileFinder and their factories' hierarchy
...
Since there's no JsVirtualFileFinder anymore, inline JvmVirtualFileFinder into
VirtualFileFinder and drop "Jvm" prefix everywhere
2017-03-03 13:33:50 +03:00
Mikhael Bogdanov
a03ed6f742
Fix for KT-16581: VerifyError when calling default value parameter with jvm-target 1.8
...
#KT-16581 Fixed
2017-03-03 11:21:42 +01:00
Ilya Chernikov
ffe3453937
Do not pollute IDEA log with fake script dependencies
2017-03-03 10:59:28 +01:00
Dmitry Petrov
634d9834de
Wrong receiver is generated for variable-as-function call on object.
...
Move 'generateExpressionForReferencedDescriptor' to CallGenerator,
use it in 'generateCall',
add PSI-free versions of some utility methods so that call elements can
be generated when we're already deep in ResolvedCall generation
and have forgotten about PSI.
2017-03-03 10:15:59 +03:00
Mikhail Zarechenskiy
d573962259
Add test for class delegation with private constructor
...
#KT-16583 Obsolete
2017-03-02 18:34:59 +03:00
Mikhail Zarechenskiy
e2dcec62d3
Fix access to top-level declarations inside anonymous initializer
...
#KT-16583 Fixed
2017-03-02 18:34:51 +03:00
Alexander Udalov
39d0cd7237
Test that all Kotlin versions in the project are consistent
...
There are two different tests: the one that checks that all versions are
consistent (but not equal, because some versions are major.minor.patch,
but some only major.minor), and the one that checks that versions of all
subprojects of the Maven projects are exactly equal (1.1-SNAPSHOT
currently)
#KT-16455 Fixed
2017-03-02 16:36:51 +03:00
Denis Zharkov
6fb83c2ba3
Force wrapping java classes from annotation methods into KClasses
...
Before this change such wrapping happened only during coercion,
i.e. when a call-site expected a KClass instance.
But when call-site expects Any, for example, no wrapping happened,
and raw j.l.Class instance was left on stack.
The solution is to put wrapping code closer to generation of annotation's
method call itself to guarantee that necessary wrapping will happen.
#KT-9453 Fixed
2017-03-02 15:19:09 +03:00
Denis Zharkov
415c3d57af
Fix substitutor for synthetic SAM adapters
...
When synthetic member comes not from the receiver type itself,
but from one of its supertypes it doesn't make sense to subsitute
the member with receiver type, we should obtain relevant supertype
and use it instead.
#KT-16578 Fixed
2017-03-02 15:06:59 +03:00
Anton Bannykh
9e5ecc11b7
JS: fixed Double.NaN behaviour (KT-13610).
2017-03-02 14:29:50 +03:00
Dmitry Petrov
f636ab21f8
Use proper descriptor for (generic) property assignment.
...
Insert IMPLICIT_INTEGER_COERCION only if Int is coerced to an integer type.
2017-03-02 14:25:58 +03:00
Dmitry Petrov
97fbbc74e6
KT-16440 ClassConstructorDescriptorImpl has null returnType
...
Set constructor return type in FunctionDescriptorResolver#createConstructorDescriptor
(it seems to be the only place where ClassConstructorDescriptorImpl#initialize(...)
is called, but returnType is not set).
2017-03-02 14:25:58 +03:00
Dmitry Petrov
dc1d92855d
KT-16438 Strange dispatch receiver for descriptors of delegated members
...
Provide proper dispatch receiver parameter for delegated members.
Use dispatch receiver parameter for delegated members in IR generation
for delegated member body (and check that the receiver has corresponding type).
2017-03-02 14:25:58 +03:00
Dmitry Petrov
9baaf607a3
KT-16566 Support destructuring declarations for lambda parameter in psi2ir
2017-03-02 14:25:58 +03:00
Dmitry Petrov
c226707a80
KT-16554 Local function with default arguments have no IR elements for them
2017-03-02 14:25:58 +03:00
Igor Chevdar
ab3681e164
Package level delegated properties have no dispatch receiver.
2017-03-02 12:33:01 +03:00
Igor Chevdar
3ef612f05a
Added dispatch receiver to delegation implementing property
2017-03-02 12:33:01 +03:00
Dmitry Jemerov
af7de9a0c5
Warn when running the compiler under Java 6 or 7
...
(cherry picked from commit 5537800)
(cherry picked from commit 5614874)
2017-03-01 16:21:57 +01:00
Mikhael Bogdanov
4d47c0fd63
Partial fix for KT-16193: Incremental compilation generates invalid bytecode for crossinlined functions; avoid IllegalAccessError
2017-03-01 14:45:11 +01:00
Alexander Udalov
3ad4f18e1a
Update grammar to Kotlin 1.1
...
Also drop obsolete comments and inline some trivial rules
2017-03-01 14:50:36 +03:00
Mikhail Zarechenskiy
875fdef917
Add tests for obsolete issues
...
#KT-15913 Obsolete
#KT-12248 Obsolete
2017-03-01 14:07:09 +03:00
Anton Bannykh
318014e4ab
Test vararg with Java behaviour only for JVM backends
2017-03-01 13:58:57 +03:00
Denis Zharkov
a7fc32c8da
Add diagnostic on calling inner classes constructors without receiver
...
Otherwise there will be just an unresolved reference that doesn't give
any useful information
#KT-8959 Fixed
2017-03-01 09:59:01 +03:00
Denis Zharkov
1e0ae04aba
Minor. Convert if to when
2017-03-01 09:59:00 +03:00
Denis Zharkov
b5a8ffaddc
Fix resolution of callable references
...
When there is unsuccessful (e.g invisible) result of one kind (static/non-static)
and there is a successful candidate for another kind, choose the latter one.
Note, that we have to postpone commiting trace until we choose one of the results,
otherwise errors of unsuccessful results are reported
TODO: Maybe it makes sense to report all results when all of them are
unsuccessful (NONE_APPLICABLE or something like this)
#KT-16278 Fixed
2017-03-01 09:59:00 +03:00
Dmitry Petrov
dd61a5b2c6
KT-16553 Underscore variable values shall not be evaluated
...
Do not generate 'componentN' calls for '_' in destructuring assignment.
2017-03-01 09:25:38 +03:00
Dmitry Petrov
63b16e14d8
KT-16536 Wrong IR generated for '++x'
...
Make psi2ir confirm to JVM BE behavior for prefix increment/decrement.
TODO reconsider after design decision (in 1.2?).
2017-03-01 09:25:38 +03:00
Dmitry Petrov
885f397cdd
KT-16535 'provideDelegate' convention is not supported in IR
...
Implement provideDelegate convention support.
NB delegate type now depends on 'provideDelegate' convention resolution.
2017-03-01 09:25:38 +03:00