Alexander Gorshenev
504bdfc283
testData for binary compatibility tests on klib library evolution
2021-01-26 03:42:15 +03:00
Steven Schäfer
3e820ff3b1
JVM: Take inline class mangling state into account for default methods
2021-01-25 18:12:01 +01:00
Dmitry Petrov
708e6914bd
JVM JVM_IR hide sealed class constructors
2021-01-25 17:29:38 +03:00
Dmitriy Novozhilov
f61a318c9d
[Test] Migrate AbstractBytecodeTextTest to new test infrastructure
2021-01-25 17:11:21 +03:00
Dmitriy Novozhilov
fd8795de99
[Test] Fix FirIdenticalChecker and update some FIR_IDENTICAL testdata
2021-01-25 17:08:32 +03:00
Dmitriy Novozhilov
98c22f9e59
[TD] Add forgotten bytecode dump
2021-01-25 17:08:32 +03:00
Dmitriy Novozhilov
5c0cfa87ba
[Test] Support some jvm codegen specific configuration directives
2021-01-25 17:08:31 +03:00
Victor Petukhov
c111c33950
Fix failing tests after 8bd78064be
2021-01-25 16:24:43 +03:00
Victor Petukhov
f06a5321a6
Approximate definitely not-null types for type parameter's types if they are already not-null (has not-null upper bounds)
...
^KT-44440 Fixed
2021-01-25 14:17:58 +03:00
Simon Ogorodnik
f2c1608c2b
Update testData
2021-01-25 13:53:45 +03:00
Denis.Zharkov
8c30adc301
FIR2IR: Unwrap intersection overrides for intersection types
2021-01-25 12:29:31 +03:00
Denis.Zharkov
3a3d2ee3e9
FIR2IR: Fix mapping for intersection overrides of deserialized properties
2021-01-25 12:29:31 +03:00
Victor Petukhov
fdf0934ade
Don't generate txt dump for buildFlexibleEnhancement.kt diagnostic test
2021-01-25 12:16:13 +03:00
Victor Petukhov
8bd78064be
Do substitution of a type enhancement, not only lower and upper bounds
...
^KT-44439 Fixed
2021-01-25 12:14:34 +03:00
Victor Petukhov
83c93aca2e
Build type enhancement properly, by taking into account both bounds of the original flexible type
...
^KT-44420 Fixed
2021-01-25 11:36:49 +03:00
Mikhail Glukhikh
94e613dd01
FIR: support custom annotation-based type attributes
2021-01-23 10:56:42 +03:00
Mikhail Glukhikh
4cd6266bce
FIR: fix suspend type serialization
2021-01-23 10:56:40 +03:00
Mikhail Glukhikh
afe335e504
FIR: serialize ExtensionFunctionType attribute
2021-01-23 10:56:37 +03:00
Mikhail Glukhikh
9e5c9efadf
FIR2IR: don't generate IrGetObject for anonymous objects
2021-01-23 10:56:36 +03:00
Mikhail Glukhikh
06ee768c6a
FIR: in case of smart cast, use original type for FirThisRcvrExpression
...
Before this commit, we used type after smart cast both for original
FirThisReceiverExpression and for wrapping FirExpressionWithSmartCast.
However, this makes FIR2IR implicit cast generator work incorrectly
(it decides not to insert implicit cast because original type is the same).
After this commit, expressions have different types and implicit cast
generator works properly.
2021-01-23 10:56:34 +03:00
Mikhail Glukhikh
4fd4f504d0
FIR: make componentX functions operator
2021-01-22 18:11:57 +03:00
pyos
4a76ea6ecb
JVM: regenerate objects if they have been regenerated in parent contexts
...
This is a hack to work around the fact that type mappings should not be
inherited by inlining contexts for lambdas called from anonymous
objects. As the lambda can call the inline function again, this could
produce a reference to the original object, which is remapped to a new
type in the parent context. Unfortunately, there are many redundant
`MethodRemapper`s between the lambda and the class file, so simply
editing `TypeRemapper` does not work. Hence, this hack. For now.
(Issue found by compiling IntelliJ IDEA BTW.)
2021-01-22 13:39:20 +01:00
Mads Ager
ef36b81c67
[JVM_IR] Reduce the amount of super suffixes on accesibility bridges.
...
The super suffix was used for any static field/method that needed
an accessor. We should only use it when that field or method is
inherited.
2021-01-22 13:20:25 +01:00
Mikhail Zarechenskiy
d2ce73853d
Report more specific diagnostic for variable + invoke calls
...
Do not report same set of diagnostics for variable call if actual
error was happened with a function candidate. Here the candidate is
invoke function on DeepRecursiveFunction
^KT-40991 Fixed
^KT-41491 Fixed
^KT-40926 In Progress
2021-01-22 13:57:47 +03:00
Dmitriy Novozhilov
c423750962
[TD] Fix incorrect module structure directives in test data file
2021-01-22 13:51:34 +03:00
Dmitriy Novozhilov
b9e9620ab5
[TD] Unmute passing Fir2Ir text test
2021-01-22 13:51:32 +03:00
Dmitriy Novozhilov
842ed624a7
[TD] Remove some outdated dumps in FIR_IDENTICAL tests
2021-01-22 13:51:31 +03:00
Dmitriy Novozhilov
77115cea92
[TD] Union ir dumps of different test files
2021-01-22 13:51:30 +03:00
Dmitriy Novozhilov
4752924b13
[TD] Update FQN's in testdata of IR text tests
2021-01-22 13:51:29 +03:00
Dmitriy Novozhilov
8286a160bd
[TD] Update order of directives
2021-01-22 13:51:27 +03:00
Dmitriy Novozhilov
aba029237d
[Test] Add handler for comparing pretty kt ir dumps
2021-01-22 13:51:25 +03:00
Dmitriy Novozhilov
6a7cd0c811
[Test] Add ability to specify applicability of diagnostic to module or file
2021-01-22 13:51:19 +03:00
Alexander Udalov
e17153fab9
Minor, improve Ant test on includeRuntime
...
Also check that we _do_ include runtime if includeRuntime is true.
2021-01-21 18:29:19 +01:00
scaventz
a13eb4c8e6
Ant task: do not include runtime by default if destination is a jar
2021-01-21 18:29:19 +01:00
Denis.Zharkov
b0b7f39c75
FIR: Do not use return statement for type of a block expression
...
Type of a block is a kind of irrelevant for lambdas: their type is much
more complicated and defined via FirDataFlowAnalyzer#returnExpressionsOfAnonymousFunction
at at FirCallCompleter.LambdaAnalyzerImpl#analyzeAndGetLambdaReturnArguments
2021-01-21 18:53:03 +03:00
Denis.Zharkov
5afebb4e78
FIR: Transform synthetic calls children even without incomplete candidate
...
It might be necessary for cases like
run @l1{
run {
if (...) return@l1 1
}
}
"if" is a synthetic call, but without candidate since there's just one branch
But return@l1 1 is incomplete because it's resolved in dependent context
and "1" is hang incomplete integer literal
2021-01-21 18:53:03 +03:00
Denis.Zharkov
5f0d00a83f
FIR: Use proper tower data contexts for postponed callable references
...
E.g., it should contain local scopes of containing lambdas
2021-01-21 18:53:03 +03:00
Denis.Zharkov
ad30c6c380
FIR: Fix callable references resolution when they're being returned from lambdas
2021-01-21 18:53:03 +03:00
Denis.Zharkov
0e368cc237
FIR: Analyze return statements for implicit lambda with independent context
2021-01-21 18:53:02 +03:00
Jinseong Jeon
2e660ef62a
Raw FIR: use lambda parameter type if available
2021-01-21 16:06:23 +03:00
Jinseong Jeon
fa0b933bc8
FIR checker: add diagnostics for missing/ambiguous component calls
2021-01-21 16:06:10 +03:00
Jinseong Jeon
de592f4f67
FIR checker: introduce FunctionChecker alias
...
and use it to add support diagnostic FUNCTION_DECLARATION_WITH_NO_NAME
2021-01-21 16:06:09 +03:00
Jinseong Jeon
f1d8a6e5d1
FIR checker: introduce DECLARATION_SIGNATURE_OR_DEFAULT positioning strategy
...
and fix CONFLICTING_OVERLOADS to use it
2021-01-21 16:06:09 +03:00
Igor Yakovlev
2e4daee1d4
[FIR] Fix invalid diagnostic fir node sites and improved invalid type parameters count diagnostic report
2021-01-21 15:20:30 +03:00
Ilmir Usmanov
704366e531
JVM: Mark suspend lambda receiver as used if callable reference
...
accesses it.
#KT-44131 Fixed
2021-01-21 12:47:59 +01:00
Mikhael Bogdanov
de00f72fa3
Generate linenumber for inline call site in case of implicit iterator/hasNext/next calls in for loop
...
Otherwise -1 is generated in smap
2021-01-21 12:04:09 +01:00
Ilmir Usmanov
952576e98f
JVM_IR: Do not unbox Result parameter if it not only one inline class
...
parameter, since in this case, the compiler generates a bridge, where
the result is unboxed.
2021-01-20 18:30:00 +01:00
Ilmir Usmanov
d48f92775b
JVM_IR: Do not unbox Result parameter in invoke if there is a bridge
...
since the bridge unboxes it.
#KT-44141 Fixed
2021-01-20 18:29:58 +01:00
Ilya Goncharov
0ddb603eaa
[JS IR] Fix of test with method in abstract class calling extension on super type
2021-01-20 20:01:42 +03:00
Steven Schäfer
9c4f8f7e54
JVM IR: Fix signature mapping for inline classes using new mangling
...
When resolving inline class methods in binary dependencies we look for
methods matching both the new and the old mangling scheme. On the IR
backend the method signature has to be computed for the inline class
replacement, since the logic for signature mangling is not contained in
the method signature mapping, unlike in the old backend.
2021-01-20 17:43:41 +01:00