Dmitry Petrov
4a9507b3ab
KT-11588 Type aliases
...
Type alias companion object
2016-06-01 14:32:44 +03:00
Mikhael Bogdanov
bdc0b6b308
Local delegated properties moved to language feature option
2016-05-31 15:27:55 +03:00
Alexander Udalov
e1a21abd72
Report error on bare types in LHS of callable reference expressions
2016-05-26 22:22:41 +03:00
Alexander Udalov
a3b38cf6ed
Extract method to fully or partially resolve callable reference
...
Reuse it in the main type-checking path in DoubleColonExpressionResolver, as
well as in ArgumentTypeResolver which handles the case when a callable
reference appears as an argument to another call
2016-05-26 22:22:41 +03:00
Alexander Udalov
693c753988
Support for new double colon expressions in type checker
...
Despite the fact that the LHS of a double colon expression is now KtExpression
instead of KtUserType, we must still consider it a type for callable references
to work. Extract and reuse relevant parts of QualifiedExpressionResolver and
TypeResolver to support this behavior
2016-05-26 22:22:41 +03:00
Alexander Udalov
7cb61b81ab
Minor, capitalize language feature names in tests
...
To simplify textual search across the codebase
2016-05-26 22:21:22 +03:00
Alexander Udalov
331a6ee414
Use LanguageFeatureSettings instead of JVM option for top level sealed classes
2016-05-26 22:15:39 +03:00
Alexander Udalov
98c3e030a1
Support enabling/disabling language features in diagnostic tests
2016-05-26 22:15:39 +03:00
Mikhail Glukhikh
9a69b8b7b5
REDUNDANT_OPEN_FOR_INTERFACE warning: reported for open members without implementation #KT-12452 Fixed
2016-05-24 14:25:27 +03:00
Mikhail Glukhikh
e66acd8101
Default modality is abstract for interface. REDUNDANT_MODIFIER_FOR_TARGET applicability reduced #KT-12302 Fixed
2016-05-24 14:25:22 +03:00
Mikhail Glukhikh
93defed324
KT-12302: ABSTRACT_MODIFIER_IN_INTERFACE warning is removed as obsolete
2016-05-24 14:25:18 +03:00
Mikhail Glukhikh
1a8181bdc4
Only private constructors for sealed / enum classes #KT-12377 Fixed
...
Also #KT-8497 Fixed
2016-05-23 13:08:57 +03:00
Mikhail Glukhikh
cffdce908e
Annotation parameters now cannot be mutable #KT-12367 Fixed
2016-05-23 13:04:00 +03:00
Dmitry Petrov
968ed3f091
KT-5068: Introduce a special diagnostic message for TYPE_MISMATCH cases such as 'fun f(): Int = { 1 }'.
2016-05-23 09:50:41 +03:00
Stanislav Erokhin
db64d9c528
Fixed visibility checks for annotation usage on top-level declarations
...
#KT-12429 Fixed
2016-05-20 14:58:18 +03:00
Alexander Udalov
ca7e4496c7
Refactor and improve class literal type checking code
...
Infer something sensible instead of error types when an error is reported, such
as absence of a type argument for Array or presence of type arguments for other
types
2016-05-20 14:53:07 +03:00
Dmitry Petrov
dd12c018ca
KT-8990: private member can't be overridden, even if it is visible in the current context
2016-05-20 14:32:48 +03:00
Dmitry Petrov
8bf87a9a4f
KT-11588 Type aliases
...
Proper abbreviated type for '<type-alias>?'
2016-05-20 14:17:26 +03:00
Dmitry Petrov
440e02016b
KT-11588 Type aliases
...
Fix diagnostic tests (renamed diagnostic message)
2016-05-20 14:17:25 +03:00
Dmitry Petrov
f296b17861
KT-11588 Type aliases
...
Additional test(s)
2016-05-20 14:17:25 +03:00
Dmitry Petrov
65293008fd
KT-11588 Type aliases
...
Type alias descriptor serialization
Types with type aliases serialization
2016-05-20 14:17:24 +03:00
Dmitry Petrov
59472927cd
KT-11588 Type aliases
...
Light class generation: do not fail on type aliases
TODO: actual binary representation for type aliases
2016-05-20 14:17:24 +03:00
Dmitry Petrov
a4406687f1
KT-11588 Type aliases
...
Resolution & expansion for type aliases.
NB: Nested type aliases capturing type parameters of outer classes are not supported yet.
2016-05-20 14:17:24 +03:00
Dmitry Petrov
b86fb64008
KT-12358: fake override of a method of 'Any' in an interface is not an "implementation".
2016-05-20 13:02:29 +03:00
Dmitry Petrov
a25ba5baf1
KT-12156: for the purposes of inline-related diagnostics
...
treat function declaration as final if it is a member of a final class
2016-05-19 17:43:29 +03:00
Stanislav Erokhin
7332032bb6
Support sealed class inheritors in the same file
...
#KT-11573 Fixed
2016-05-19 16:22:40 +03:00
Mikhail Glukhikh
a4ad995f31
Overridden functions using default arguments in recursive call are no more considered tail recursive #KT-4285 Fixed
2016-05-17 14:29:01 +03:00
Denis Zharkov
d0acb3674a
Fix rendered testData
...
New members in enum member scope
2016-05-16 15:38:13 +03:00
Denis Zharkov
e90c92f8d3
Separate additional built-in members from JDK into three groups
...
- White list: can be used as common built-in declaration
- Black list: can be used only for overrides and super-calls-
- Not considered members: ones that is not in black or white list.
Such members can be used in any context, but they usages marked as deprecated
Third kind is needed to make possible use declarations added in future JDK versions.
Deprecation is necessary because they may get into black list in next Kotlin compiler version
2016-05-16 15:38:13 +03:00
Mikhael Bogdanov
c06b51c1d1
Allow top-level local delegated properties in scripts
2016-05-13 19:11:23 +03:00
Dotlin
fa523b9af4
Delegated Properties: Analysis adjustments for local delegated properties support
2016-05-13 19:11:18 +03:00
phx402@gmail.com
75e9e35669
Fixed incorrect "No cast needed" warning when casting from extension function to regular one and vise versa
...
#KT-11780 Fixed
2016-05-13 13:40:14 +03:00
Nikolay Krasko
9c2ceca4b8
Revert "Additional simple test for variable initialize in secondary constructor"
...
This reverts commit 147f170f80 .
2016-05-12 17:22:16 +03:00
Nikolay Krasko
147f170f80
Additional simple test for variable initialize in secondary constructor
2016-05-12 17:13:24 +03:00
Denis Zharkov
d259b91143
Add MutableMap.remove(K, V) as built-in declaration
...
Use PlatformDependent annotation to guarantee it's only be available for JDK8
Also adjust type-safe bridges and mutable collection stubs generation
2016-04-29 15:08:54 +03:00
Denis Zharkov
55c4f875c8
Use signatures instead of fq-names in special built-ins
...
It's necessary to distinguish overloads,
e.g. MutableMap.remove now has two versions
2016-04-29 15:08:54 +03:00
Mikhail Glukhikh
6b945ba103
Regular checkType() is now called during condition analysis, TYPE_MISMATCH_IN_CONDITION removed #KT-11998 Fixed
2016-04-27 18:12:28 +03:00
Denis Zharkov
9bf2538e4c
Introduce predefined enhancement info
...
It can be used to specify enhanced signature for standard JDK methods
without them be actually annotated
#KT-9194 In Progress
#KT-5175 In Progress
#KT-10370 In Progress
#KT-7127 In Progress
2016-04-25 17:41:08 +03:00
Denis Zharkov
b94baede38
Minor. Fix rendered Throwable member scope
2016-04-25 17:41:08 +03:00
Denis Zharkov
5bc5722051
Load additional JDK functions into built-ins member scope
...
#KT-5990 Fixed
#KT-7127 Fixed
#KT-10370 Fixed
2016-04-25 17:41:08 +03:00
Mikhail Glukhikh
d24528f6bb
Control flow analysis: nested finally blocks now appear in correct order in CFG #KT-4764 Fixed
2016-04-22 15:16:57 +03:00
Alexey Andreev
7b76fa6103
KT-11030 Remove tests for diagnostics for local classes in JS backend
2016-04-20 18:12:25 +03:00
Mikhail Glukhikh
771fb0ace2
Compiler warning on identical enum constant / is type entries #KT-4829 Fixed
2016-04-20 12:21:31 +03:00
Dmitry Petrov
420c7a0285
KT-11111:
...
- override by a final inline fun is a warning
- override by a fun with reified type parameters is an error
2016-04-20 11:59:03 +03:00
Yan Zhulanow
9b1402d804
Fix "No error on increment or augmented assignment when 'get' is an operator but 'set' is not" #KT-11300
2016-04-19 19:24:38 +03:00
Alexander Udalov
9c99152126
Do not consider error results successful in '::' LHS resolution
...
Fixes EA-81649
2016-04-19 18:37:02 +03:00
Alexander Udalov
76d3246514
Fix type of member references without explicit class on LHS
...
Type of '::foo' for a function foo in a class A should be KFunction0<Unit>, not
KFunction1<A, Unit>. Continue to report an error in this case, to be maybe
supported in the future
2016-04-12 20:03:51 +03:00
Mikhail Glukhikh
8a0641a639
Warning about override / open redundancy is no more reported
2016-04-11 16:32:36 +03:00
Dmitry Petrov
1f3323ed32
KT-11750 Do not report REDECLARATION on descriptors which are not available in sources.
2016-04-11 09:13:07 +03:00
Alexander Udalov
7c90fbe4de
Compute return type for property getters more safely
...
Do not call `isError()` on property's type right after creation of
PropertyGetterDescriptor because the property has no getter yet (it's created
but not yet stored to the property, that happens a bit later), and `isError()`
leads to computation of the delegate type, which for delegated properties
performs some complex resolution (see `VariableTypeResolver#process`) which
relies on the fact that the property already has a getter.
Since the purpose of the original change (883e2e4d ) was to support a quick fix
which would add the type to a property in an expression like "val x get() =
...", check the type (or initializer) presence in the PSI instead, this is
safer and is still suitable for the quick fix.
Also fix arguments to "wrong getter type" diagnostic: previously something
useless like "expected Int, actual Int" was reported
#KT-11809 Fixed
2016-04-07 15:35:58 +03:00