Dmitry Petrov
9c74f27967
Type alias can't expand to 'dynamic'
2016-06-08 15:55:52 +03:00
Dmitry Petrov
ef4c3bdae8
Don't expand types that don't contain type aliases or type parameters.
2016-06-08 15:55:52 +03:00
Dmitry Petrov
cb08d976d3
Tests for importing type aliases
2016-06-08 15:55:52 +03:00
Mikhail Glukhikh
4b6b35dadf
Type parameter is considered capable of taking any value for the purpose of cast possibility check #KT-6611 Fixed
2016-06-08 15:25:34 +03:00
Alexander Udalov
526a64dc36
Pass data flow info from '::' expressions, fix expected type
2016-06-07 12:43:07 +03:00
Alexander Udalov
e2d6e0cbab
Propagate control flow to bound double colon expressions
...
"Unused expression" should be reported on unused double colon expressions, this
is postponed
#KT-12551 Open
2016-06-07 12:42:42 +03:00
Alexander Udalov
0ce6bd9999
Ignore resolution to function without arguments on LHS of '::'
...
In the expression "Runnable::run" we were resolving the left-hand side to the
SAM constructor of Runnable. Now we detect this situation, ignore the result of
such resolution, and continue resolving the LHS as a type
2016-06-07 12:42:19 +03:00
Alexander Udalov
04c190231a
Support bound references to objects and companion objects
...
Tweak member extension detection a little bit to prohibit extensions imported
from objects (they don't have one of the receiver parameters)
2016-06-07 12:41:30 +03:00
Alexander Udalov
d90b40c661
Use LanguageFeatureSettings instead of custom option for bound callable references
2016-06-07 12:41:29 +03:00
Dmitry Petrov
872b3e8a52
DeclarationsChecker runs checks on type alias declarations.
...
TYPEALIAS_SHOULD_EXPAND_TO_CLASS diagnostics
(implemented for type aliases expanded to type parameters).
2016-06-06 13:50:37 +03:00
Dmitry Petrov
ea249244c5
'where' clause in type alias declaration is a syntax error
...
(type alias parameters can't have bounds)
2016-06-06 13:50:37 +03:00
Dmitry Petrov
772fe5badb
Treat unsupported or malformed type alias as a type alias with error types.
2016-06-03 16:07:20 +03:00
Dmitry Petrov
3500f5a96b
Type alias: resolve type alias RHS during force-resolve.
2016-06-03 16:07:20 +03:00
Dmitry Petrov
df335b9e8d
Type aliases: do not reparse RHS of type alias declaration in expanded type resolution
2016-06-03 16:07:20 +03:00
Mikhail Glukhikh
a22e7d3bcf
KT-12152 : leaking this inspection: accessing non-final member / this in non-final class
2016-06-03 14:45:58 +03:00
Mikhail Glukhikh
be40cf8138
KT-12152 : constructor consistency: distinguish properties with and w/o backing fields, with default / custom accessors
2016-06-03 09:45:49 +03:00
Mikhail Glukhikh
422ea4c6cb
KT-12152 : constructor consistency: handle open property accessing
2016-06-03 09:45:45 +03:00
Mikhail Glukhikh
f7b5d67543
KT-12152 : constructor consistency: handle non-final classes
2016-06-03 09:45:41 +03:00
Mikhail Glukhikh
8e18165065
KT-12152 : constructor consistency analysis, base cases
2016-06-03 09:45:37 +03:00
Alexander Udalov
1339286261
Drop undocumented absolute name specification feature with 'package.'
2016-06-01 19:30:03 +03:00
Dmitry Petrov
0319d5a5aa
KT-11588 Type aliases
...
- Nested type aliases
- UNSUPPORTED_TYPEALIAS error (language level < 1.1)
- tests for is/as/as? with type alias
2016-06-01 14:32:46 +03:00
Dmitry Petrov
e979300579
KT-11588 Type aliases
...
Diagnostics for type arguments substitution in type alias expansion
(initial implementation; TODO: refactor).
2016-06-01 14:32:46 +03:00
Dmitry Petrov
9cf8ef287e
KT-11588 Type aliases
...
Additional tests for generic type alias arguments.
Small refactoring in TowerLevels.
2016-06-01 14:32:45 +03:00
Dmitry Petrov
62f8d00f89
KT-11588 Type aliases
...
Create substituted constructor descriptors for generic type aliases.
2016-06-01 14:32:45 +03:00
Dmitry Petrov
c63166047c
KT-11588 Type aliases
...
Additional tests for type alias constructor & companion object:
- codegen
- error diagnostics
2016-06-01 14:32:45 +03:00
Dmitry Petrov
1329a43d89
KT-11588 Type aliases
...
Type alias constructor
2016-06-01 14:32:44 +03:00
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