Alexey Andreev
70176dfacc
JS: translate call arguments in the order the occur in source code, not in order of parameters in descriptor. See KT-15506
2017-01-12 18:12:36 +03:00
Alexey Andreev
e6b78f68cd
JS: support case when class inherits method from superclass and both implements same method (but with optional parameter) from superinterface.
2017-01-12 18:12:36 +03:00
Alexander Udalov
abe2ad155c
Sanitize names for script class files
...
Use the same process that is done for package parts in the JVM back-end, except
adding the "Kt" suffix
#KT-15225 Fixed
2017-01-12 11:24:24 +03:00
Alexander Udalov
6ffa56b640
Move name sanitization utilities to module 'descriptors'
2017-01-12 11:24:23 +03:00
Svyatoslav Scherbina
d9023bdf70
backend: move some JVM lowering to common
2017-01-12 11:56:32 +07:00
Svyatoslav Scherbina
5a5f4fc224
backend: extract common lowering utils
2017-01-12 11:56:31 +07:00
Svyatoslav Scherbina
f85538129d
backend: introduce common backend context
2017-01-12 11:56:30 +07:00
Svyatoslav Scherbina
2e88dd0675
backend: fix minor bug in LocalFunctionsLowering
...
extension receiver parameter should be remapped too
(e.g. to support lambda with receiver)
2017-01-12 11:56:29 +07:00
Svyatoslav Scherbina
e6c9a709b2
backend: fix minor bug in SharedVariablesLowering
2017-01-12 11:56:28 +07:00
Alexander Udalov
edb4fd1dfd
Do not emit pre-release flag if -Xskip-metadata-version-check is used
...
The -Xskip-metadata-version-check command line argument is supposed to be used
to avoid getting errors only; the side effect that it also caused compiler to
write the pre-release flag to binaries was a mistake and is fixed now
2017-01-11 19:28:52 +03:00
Alexander Udalov
8f9ce5d0f2
Fix some issues in script constructor param/arg matching
2017-01-11 19:28:51 +03:00
Alexander Udalov
e860d620c6
Add script flag to kotlin.Metadata
...
This will allow to distinguish compiled scripts from ordinary classes in the
compiler, reflection, IDE, etc.
#KT-13382 Fixed
2017-01-11 19:28:51 +03:00
Ilya Gorbunov
dcd7f3eb57
Fix test data after introducing overloads #KT-15630
2017-01-11 14:33:17 +03:00
Mikhael Bogdanov
ec42b58877
Fix @PublishedApi checking
2017-01-11 11:50:34 +01:00
Mikhael Bogdanov
2931c316a3
Fix for KT-15575: VerifyError: Bad type on operand stack
...
#KT-15575 Fixed
2017-01-11 11:50:33 +01:00
Alexander Udalov
a3f6fbe0c1
Add test on contents of .kotlin_module files
2017-01-11 13:15:59 +03:00
Alexander Udalov
7b5c90ebaf
Correctly load multifile package parts from binaries
...
JvmPackagePartProvider should not just blindly load all multifile parts from
all libraries on the classpath, but only those from multifile classes which
shadow (come earlier on the classpath) other classes with the same name.
Otherwise if you have different versions of the same library (which uses
multifile classes) on the classpath, the compiler will see parts from both
versions. If some declaration have moved from one part to another, it's
possible to observe an overload resolution ambiguity error
#KT-15287 Fixed
2017-01-11 13:15:58 +03:00
Alexander Udalov
69bfc5b4bb
Write multifile part->facade mapping to .kotlin_module
2017-01-11 13:15:57 +03:00
Alexander Udalov
6c1cadf273
Refactor PackageParts: add explicit mutating methods
2017-01-11 13:15:57 +03:00
Alexander Udalov
db3fa8eaca
Refactor JvmPackagePartProvider
...
Make code more imperative than functional, preserve the information about the
original root where the module mapping was discovered
2017-01-11 13:15:56 +03:00
Alexander Udalov
0dbb02ec6a
Fix generic signature for KFunctionN types on JVM
...
#KT-15473 Fixed
2017-01-11 13:15:24 +03:00
Svyatoslav Scherbina
bf3b5281a9
ir.tree: add trivial building utils
2017-01-11 14:54:13 +07:00
Svyatoslav Scherbina
d0a166ffec
psi2ir: move IR building utils to ir.tree
2017-01-11 14:54:12 +07:00
Svyatoslav Scherbina
feb0dee563
psi2ir: untie IR building utils from PSI
2017-01-11 14:54:11 +07:00
Svyatoslav Scherbina
4c3fb9a21f
psi2ir: improve backing field usage generation
...
Also update corresponding tests data.
2017-01-11 14:54:10 +07:00
Svyatoslav Scherbina
0189faec2e
ir.tree: fix IrTry.transformChildren:
...
transform `finallyExpression` too.
2017-01-11 14:54:09 +07:00
Dmitry Petrov
7a8ec86cb9
KT-11398
...
- turn INACCESSIBLE_TYPE into a warning;
- improve diagnostic message for INACCESSIBLE_TYPE.
2017-01-11 10:23:01 +03:00
Nikolay Krasko
80af30fb4f
Always remove extension from script file
...
Fix for 35631dc2df refactoring.
Extension was actually always removed before refactoring.
2017-01-11 00:39:16 +03:00
Mikhail Glukhikh
b81268cca1
Control-flow analysis: do-while scope is ended after condition but before jump #KT-15334 Fixed
2017-01-10 17:57:43 +03:00
Mikhael Bogdanov
5071baf970
Support increment and '*=' operations on inline properties
2017-01-10 14:09:42 +01:00
Mikhael Bogdanov
043f3199c7
Fix for KT-15446: Property reference on an instance of subclass causes java.lang.VerifyError
...
#KT-15446 Fixed
2017-01-10 14:09:42 +01:00
Mikhael Bogdanov
ff734ce9ea
'isInlineOnlyOrReified' renamed to 'isInlineOnlyOrReifiable'
2017-01-10 14:09:41 +01:00
Mikhael Bogdanov
dc4cdbf82d
Fix for KT-14162: Support @InlineOnly on inline properties
...
#KT-14162 Fixed
2017-01-10 14:09:41 +01:00
Mikhail Zarechenskiy
d89afc419d
Fix tests because of automatic optimize imports
2017-01-10 14:28:31 +03:00
Mikhail Zarechenskiy
101ad11db5
Regenerate all automatically-generated data
2017-01-10 14:24:01 +03:00
Alexander Udalov
32d2faf3d1
Fix KAnnotatedElement.findAnnotation when no annotation is found
...
#KT-15540 Fixed
2017-01-10 12:23:26 +03:00
Alexander Udalov
f4200e02bc
Do not mark class files as pre-release if compiled with -language-version 1.0
...
#KT-15584 Fixed
2017-01-10 12:23:26 +03:00
Alexander Udalov
7107ee2eeb
Write/load subclasses of sealed classes in metadata
...
Note that now DeserializedClassDescriptor.getSealedSubclasses works a lot
faster than before, for all newly compiled sealed classes except empty ones. It
may be optimized further if we look at the metadata version of the file the
class was loaded from, however it's not easy currently because
DeserializedClassDescriptor is declared in common (non-JVM) code and has no
direct access to the binary version information.
This will also allow to add a reflection API to get subclasses of a sealed
class
#KT-12795 Fixed
2017-01-10 12:23:26 +03:00
Alexander Udalov
75a4958144
Introduce ClassDescriptor.getSealedSubclasses
...
#KT-12795 In Progress
2017-01-10 12:23:25 +03:00
Alexander Udalov
164c72e877
Prefer package with class files to class with the same name
...
See comments in JvmDependenciesIndexImpl and in the test
#KT-15464 Fixed
2017-01-10 12:23:25 +03:00
Mikhail Zarechenskiy
6cccad9647
Update year in license and regenerate tests
2017-01-10 12:01:17 +03:00
Mikhail Zarechenskiy
cff0865c87
Fix error type for implicit invoke with function literal argument
...
#KT-11401 Fixed
2017-01-10 11:44:51 +03:00
Nikolay Krasko
9f11564708
Deprecate version field and preserve order of script providers in extension point
...
It's impossible to guess the order of the final list when there're
providers from different vendors as they might have different versioning systems.
com.intellij.openapi.extensions.LoadingOrder constants can be used by plugins authors to
resolve priority issues.
2017-01-09 19:57:58 +03:00
Nikolay Krasko
9ce74dd18c
A better toString for KotlinScriptDefinitionFromAnnotatedTemplate
2017-01-09 19:57:54 +03:00
Nikolay Krasko
7abcf3cec2
Minor: suppress warnings
2017-01-09 19:57:53 +03:00
Nikolay Krasko
35631dc2df
Minor: rewrite with standard functions
2017-01-09 19:57:51 +03:00
Mikhail Zarechenskiy
76b0b785c5
Prohibit to use enum entry as a type
...
#KT-14179 Fixed
2017-01-09 18:30:32 +03:00
Alexey Andreev
069711c3d5
JS: fix translation of float constants. See KT-8413
2016-12-30 16:22:07 +03:00
Alexey Andreev
900adcf29b
JS: prohibit stable (public) names with non-identifier chars. Rewrite unstable (private) names with non-identifier chars. See KT-4160
2016-12-30 16:21:18 +03:00
Alexey Andreev
7f0166623d
JS: when none of exhaustive when clauses match, generate code that throws exception. See KT-12194
2016-12-30 16:20:00 +03:00