Pavel V. Talanov
c0a031eafe
Support secondary constructors in decompiled text
...
Build cls stubs for secondary constructors
2015-03-13 20:17:32 +03:00
Pavel V. Talanov
fd718ad366
JetConstructorDelegationCall should not be stubbed
2015-03-13 20:17:07 +03:00
Alexander Udalov
e5d5b49ce2
Fix exception from ::class literals on unresolved classes
2015-03-12 23:14:55 +03:00
Stanislav Erokhin
2627dc76c2
Compilation fix.
2015-03-12 17:11:54 +03:00
Stanislav Erokhin
8accdcc5cb
Fix type inference for function expression parameters
2015-03-12 17:11:53 +03:00
Stanislav Erokhin
af4aff38e5
Minor: remove duplicate code
2015-03-12 17:11:53 +03:00
Stanislav Erokhin
f47f285868
Expected function type used for parameter types inference in function expression
2015-03-12 17:11:53 +03:00
Stanislav Erokhin
639003b8a8
Allowed function parameter without type declaration in the parser
2015-03-12 17:11:52 +03:00
Stanislav Erokhin
d9882a6d0b
Move inference parameter type in FunctionDescriptorResolver
2015-03-12 17:11:52 +03:00
Stanislav Erokhin
0c74675e6e
Changed element parameter for EXPECTED_PARAMETERS_NUMBER_MISMATCH diagnostic
2015-03-12 17:11:52 +03:00
Stanislav Erokhin
072a9f4977
Refactoring: extract FunctionResolver from DescriptorResolver
2015-03-12 17:11:51 +03:00
Stanislav Erokhin
8ed3314b2c
Divided resolveFunctionDescriptor method in to several pieces
2015-03-12 17:11:51 +03:00
Stanislav Erokhin
07a691f4b7
Merge methods resolveFunctionDescriptor && resolveFunctionDescriptorWithAnnotationArguments
2015-03-12 17:11:50 +03:00
Stanislav Erokhin
dbcb4fb060
Minor: used util method
2015-03-12 17:11:50 +03:00
Stanislav Erokhin
4050e7a48b
Rename ClosureExpressionsTypingVisitor to FunctionsTypingVisitor.
2015-03-12 17:11:50 +03:00
Stanislav Erokhin
711c5bb88f
Rename ClosureExpressionsTypingVisitor.java -> .kt
2015-03-12 17:11:49 +03:00
Stanislav Erokhin
779c6deb34
Convert ClosureExpressionsTypingVisitor to kotlin
2015-03-12 17:11:49 +03:00
Stanislav Erokhin
ee4892c99f
Moved method visitNamedFunction from BasicExpressionTypingVisitor to ClosureExpressionsTypingVisitor.
2015-03-12 17:11:48 +03:00
Stanislav Erokhin
bd525eac31
Moved method visitObjectLiteralExpression from ClosureExpressionsTypingVisitor to BasicExpressionTypingVisitor.
2015-03-12 17:11:48 +03:00
Stanislav Erokhin
6fb8af1dda
Move util backend function isNamedFun && isNamedFunOrLambda to frontend
2015-03-12 17:11:47 +03:00
Stanislav Erokhin
929f1bc9ba
Fixed method hasTypeParameterListBeforeFunctionName in JetNamedFunction
2015-03-12 17:11:47 +03:00
Stanislav Erokhin
44895a23cf
Frontend support for function as expression
2015-03-12 17:11:46 +03:00
Stanislav Erokhin
6ccd8ab764
Move method visitNamedFunction from ExpressionTypingVisitorForStatements to BasicExpressionTypingVisitor.
...
This commit done only for clean history
2015-03-12 17:11:45 +03:00
Stanislav Erokhin
a235110d44
Fixed function expression recovery
2015-03-12 17:11:45 +03:00
Stanislav Erokhin
983e1bc932
Added function as expression support to parser
2015-03-12 17:11:44 +03:00
Stanislav Erokhin
560c32c0f1
Added diagnostic error when in function declaration name was omitted
2015-03-12 17:11:44 +03:00
Stanislav Erokhin
a8536fef9b
Mute syntax error when function name was omitted
2015-03-12 17:11:44 +03:00
Stanislav Erokhin
a33450395c
Resolve parenthesized element as expression
2015-03-12 17:11:43 +03:00
Stanislav Erokhin
3b92cab9e0
Changed containing declaration for PropertyDeclarationInnerScope
2015-03-12 17:11:43 +03:00
Stanislav Erokhin
49b77a1523
Reformat code
2015-03-12 17:11:43 +03:00
Andrey Breslav
2f39cb6243
Remove useless casts after fixing subtyping for star projections
2015-03-12 15:46:40 +03:00
Nikolay Krasko
dcd29cb65d
Revert "Generate descriptor for trait constructor. Exception is thrown otherwise (EA-38416)"
...
This reverts commit 6ba120bba8 .
2015-03-12 14:18:22 +03:00
Nikolay Krasko
6ba120bba8
Generate descriptor for trait constructor. Exception is thrown otherwise (EA-38416)
2015-03-12 12:59:22 +03:00
Alexey Sedunov
11a4cdf7ec
Control-Flow Analysis: Fix NPE for array assignments without right-hand side
...
#EA-63602 Fixed
2015-03-11 23:33:58 +03:00
Alexey Sedunov
56031cb270
Control-Flow Analysis: Fix bug in finally-block repetition in the presence of non-local returns
...
#EA-65982 Fixed
2015-03-11 23:33:57 +03:00
Pavel V. Talanov
2987e72d29
Do not report redeclaration when outer class and default object's members clash
...
Previously we prohibited classes and properties with the same name (now it's unnecessary)
Add test for backends that they support qualified (by default object name) member references inside class body
2015-03-11 21:06:05 +03:00
Andrey Breslav
266485add3
Serialization of star projections fixed
2015-03-11 19:38:14 +03:00
Denis Zharkov
70c573864a
Prohibit DelegationBy specifier when no primary constructor
...
Also add codegen test for case when there is primary
2015-03-11 17:45:29 +03:00
Denis Zharkov
5eb4dcd913
Report conflicting overloads for constructors
...
- It's worked almost fine but diagnostics were filtered out by
positioning strategy.
- Also a couple of "put" calls to Multimap are replaced by "putValues"
within OverloadResolver, that is more semantically correct.
- Note that constructors of top-level classes are handled when processing
package, it helps to figure out if there are clashes with top-level
functions that have the same name.
- But constructors of different classes are not reported as
overloads because containing classes has the same name and will be
reported as redeclaration.
2015-03-11 17:45:28 +03:00
Denis Zharkov
9d2d3c0c7b
Take data flow info from delegation call
2015-03-11 17:45:28 +03:00
Denis Zharkov
aa5599f6ca
Improve positioning strategy for delegation calls
2015-03-11 17:45:28 +03:00
Denis Zharkov
67f97fea42
Prohibit data classes with no primary constructor
2015-03-11 17:45:28 +03:00
Denis Zharkov
4c26d037d9
Resolve property initializer if there is no primary constructor
2015-03-11 17:45:27 +03:00
Denis Zharkov
a872a51a19
Prohibit explicit super call for enum ctrs
2015-03-11 17:45:26 +03:00
Denis Zharkov
f07566d30d
Add warning for initializers with obsolete syntax
...
Expected 'init' keyword before class initializer
2015-03-11 17:45:26 +03:00
Denis Zharkov
0dc155d8c9
Resolve annotations on secondary constructors
2015-03-11 17:45:26 +03:00
Denis Zharkov
50c8c6f68b
Basic completion within secondary constructors
...
body and delegation call
2015-03-11 17:45:26 +03:00
Denis Zharkov
7d963e8e07
Differ this/non-this instances for vars initialization in class
...
When deal with constructed object (not this) treat it like it's fully initialized.
Otherwise (this or access with no receiver) access instruction
should be handled as it was before.
#KT-6788 Fixed
#KT-4126 Fixed
2015-03-11 17:45:25 +03:00
Denis Zharkov
1004e016fd
Minor, drop unused method
2015-03-11 17:45:25 +03:00
Denis Zharkov
f673f4ff47
Prohibit super delegation call if there is primary constructor
2015-03-11 17:45:25 +03:00