Alexander Udalov
ce9691cd2b
Support platform/impl modifiers for properties
...
Do not allow platform properties to have backing fields, initializers, be
delegated, lateinit or const, or have accessors with bodies
2016-11-25 20:50:18 +03:00
Alexander Udalov
af1264a46d
Support platform/impl modifiers for functions
...
Also add a new capability for ModuleDescriptor, which is used to obtain the
platform in the multi-platform scenario in tests.
Suppress the following errors for platform functions: "function has no body"
and "nothing to inline". Also do not report redeclaration between platform and
non-platform functions because this is the case when the common +
platform-specific code are analyzed together.
Note that some diagnostics reported in tests are not yet implemented in this
commit, they appear in subsequent commits
2016-11-25 20:50:17 +03:00
Alexander Udalov
525e6e53fe
Do not report unhelpful diagnostic for unresolved call inside inline function
...
#KT-14887 Fixed
2016-11-22 18:19:01 +03:00
Denis Zharkov
5276c3c755
Support 'interceptResume' operator in frontend
...
#KT-14891 In Progress
2016-11-22 14:33:40 +03:00
Dmitry Petrov
e6fcf20cf2
No variance elision in type alias substitution.
...
Add test with cyclic inheritance via type alias.
2016-11-22 10:04:47 +03:00
Dmitry Petrov
67fe28b8d8
Combine type annotations for arguments of type aliases.
2016-11-22 10:04:47 +03:00
Dmitry Petrov
063bce23d2
Prohibit constructing projected types via type aliases.
2016-11-22 10:04:47 +03:00
Dmitry Petrov
d665193c20
Type alias constructors for inner classes in expressions ans supertype lists.
2016-11-21 10:25:51 +03:00
Dmitry Petrov
4c47d77a9f
Report error on non-top-level type aliases (unsupported in 1.1).
...
Get rid of nested type aliases in project.
2016-11-21 10:25:51 +03:00
Dmitry Petrov
f7203da2d6
Type inference SHOULD NOT work for type alias constructor in supertypes list
...
(same as for classes: type arguments should be provided explicitly).
2016-11-16 14:11:14 +03:00
Dmitry Petrov
cd8b5dcb00
Constructors for inner type aliases: add a failing test (no way to invoke such constructor at the moment).
2016-11-16 14:11:14 +03:00
Dmitry Petrov
718e8ebf9e
Inner type aliases.
...
Type alias is considered "inner" if it captures outer class type parameters (implicitly or explicitly).
2016-11-16 14:11:14 +03:00
Denis Zharkov
6fca46a452
Allow inferring property type from its getter
...
#KT-550 Fixed
2016-11-15 09:30:13 +03:00
Dmitry Petrov
6876f0e4d2
Support type aliases as bare types after 'is/as'.
2016-11-10 18:33:50 +03:00
Dmitry Petrov
37eedc3703
Hack: do not add trivial constraints (t <: Any?) for constituent types,
...
otherwise nested calls handling logic in old inference wouldn't work for type alias constructors.
2016-11-10 14:54:11 +03:00
Dmitry Petrov
549ae59562
Inference for type alias constructor type arguments: better error reporting.
2016-11-10 14:54:11 +03:00
Dmitry Petrov
94d7bd7a6b
KT-14641: Nested type alias reference via an instance is an error.
2016-11-10 14:54:11 +03:00
Mikhail Glukhikh
ce72337ebd
Effective visibility is now considered private for invisible fake #KT-14469 Fixed
2016-11-10 13:42:58 +03:00
Zalim Bashorov
41bd276814
Mute some new tests for JS and regenerate tests
2016-11-09 21:51:33 +03:00
Zalim Bashorov
1dedb38481
Regenerate tests
2016-11-09 21:41:12 +03:00
Dmitry Petrov
03d8aa272b
Infer type arguments of type alias constructors.
2016-11-09 10:48:07 +03:00
Mikhail Zarechenskiy
3df5efb236
Introduce language feature: underscores in numeric literals
...
#KT-2964 Fixed
2016-11-08 19:04:53 +03:00
Denis Zharkov
6491d3fbac
Do not report DSL scope violation error when language-version is 1.0
...
#KT-11551 Fixed
2016-11-01 15:58:14 +03:00
Denis Zharkov
7553d3f72b
Intoduce and support DslMarker annotation
...
#KT-11551 In Progress
2016-11-01 15:58:14 +03:00
Dmitry Petrov
ed60674d13
KT-14498: Properly check variance in expanded types.
2016-10-28 18:02:15 +03:00
Mikhail Glukhikh
2130164d9b
EXTERNAL_DECLARATION_CANNOT_BE_ABSTRACT is now reported on property if accessor is external #KT-9297 Fixed
...
Also fixes EA-89227
2016-10-27 16:25:43 +03:00
Denis Zharkov
09dc207052
Add SingleUnderscoreForParameterName language feature
2016-10-24 18:00:02 +03:00
Denis Zharkov
1f0293eb42
Check modifiers applicability on destructured lambda parameters
...
#KT-14502 Fixed
2016-10-24 18:00:02 +03:00
Denis Zharkov
51f4244980
Report UNUSED_DESTRUCTURED_PARAMETER_ENTRY
...
on destructured lambda parameters
#KT-14347 Fixed
2016-10-24 10:19:25 +03:00
Denis Zharkov
dbca310d8c
Support single-underscore variable names partially
...
Currently only parameters of lambdas/function expressions
and destructuring entries are allowed
#KT-3824 In Progress
#KT-2783 In Progress
2016-10-24 10:19:25 +03:00
Dmitry Petrov
2986e7b508
Check for repeated annotations in type alias expansion.
2016-10-21 09:56:10 +03:00
Dmitry Petrov
5531762ab1
Check for repeated annotations in type alias declaration.
2016-10-21 09:56:10 +03:00
Mikhail Glukhikh
a19d178867
Initialization analysis : more accurate handling of non-local variables while merging data #KT-14304 Fixed
2016-10-20 19:52:44 +03:00
Dmitry Petrov
c41ec1ddfb
KT-14400: Properly handle TypeAliasConstructorDescriptor in KotlinTypeMapper.mapToCallableMethod(...)
...
Implement getDefaultType() in TypeAliasDescriptor subclasses.
2016-10-20 09:56:03 +03:00
Dmitry Petrov
1600037625
KT-14307, KT-14377: Run declaration checks on local type aliases.
2016-10-17 16:22:04 +03:00
Dmitry Petrov
753a558bcb
KT-14352 Record short reference to companion object via type alias,
...
so that it would be checked properly.
2016-10-17 10:11:58 +03:00
Dmitry Petrov
e7ca00d91b
Support @SinceKotlin annotation for type aliases.
2016-10-13 17:52:21 +03:00
Dmitry Petrov
8d634f6003
KT-14274: resolve type alias constructors calls in supertypes list as type alias constructors.
...
Support @Deprecated for type aliases, including type alias constructors.
2016-10-13 17:52:21 +03:00
Dmitry Petrov
d2d8f72ffc
Annotations on type aliases: typealias is not a "default target".
...
Add diagnostic test for annotations on type aliases.
2016-10-13 17:52:21 +03:00
Dmitry Petrov
c6350e1afb
Concatenate annotations in type alias expansion.
2016-10-13 17:44:14 +03:00
Denis Zharkov
84153f9636
Add warning for ambiguous annotated expression syntax
...
#KT-14238 In Progress
2016-10-12 11:40:12 +03:00
Denis Zharkov
bec84b1d7b
Change parsing of annotations on block level expressions
...
Attach annotations to the closest prefix expression instead of
whole statement if no new line found after annotations
The motivation is for a simple annotated expression like '@ann x + y'
its syntax form must not change after prepending 'val z = ' just before it
2016-10-12 11:39:04 +03:00
Valentin Kipyatkov
6b94e5fd34
Use parameter names from function type for invoke() function
...
#KT-435 Fixed
#KT-9016 Fixed
2016-10-11 23:38:49 +03:00
Alexander Udalov
167ab1f860
Introduce "-api-version" CLI option
...
The `@SinceKotlin("X.Y.Z")` annotation now hides a particular declaration from
resolution when the API version specified by the `-api-version` option is
_less_ than X.Y.Z. The comparison is performed as for versions in Maven:
MavenComparableVersion is in fact a copy of
org.apache.maven.artifact.versioning.ComparableVersion.
Also support "!API_VERSION" directive in diagnostic tests
#KT-14298 Fixed
2016-10-11 17:46:01 +03:00
Alexander Udalov
e3df8ed2fe
Introduce SinceKotlin annotation, check validity of its value
...
#KT-14297 Fixed
2016-10-11 17:45:51 +03:00
Alexander Udalov
aaeae8b948
Support deprecation level HIDDEN for classifiers
...
Classifiers annotated with `@Deprecated(level = HIDDEN)` now have smaller
priority in imports, similarly to private classes. For example, if two
classifiers named Foo are imported with a star import and one of them is
deprecated-hidden, the name Foo in the source code is resolved to the other
one.
Also a minor change in multi-module diagnostic tests: do not append newlines
after the last module in the test
#KT-13926 Fixed
2016-10-11 17:30:14 +03:00
Alexander Udalov
83c86d06ed
Report error instead of warning for deprecation level HIDDEN
...
Since functions usually are hidden from resolution when they are
deprecated-hidden, the problem can only be reproduced for properties with
deprecated-hidden accessors, where DeprecatedCallChecker reported warnings
instead of errors
2016-10-11 17:30:13 +03:00
Alexander Udalov
2e4592c6dc
Report error on bound callable references in compatibility mode
...
Previously examples were failing with IllegalStateException from JVM back-end
because there was an error type without any error reported
2016-10-11 17:30:10 +03:00
Mikhail Glukhikh
8d48b0d2a0
UNUSED_VARIABLE is now reported only for last entry of destructuring declaration (if applicable) #KT-14221 Fixed
2016-10-10 14:42:09 +03:00
Alexander Udalov
1e51ba7d00
Run classifier usage checkers for ambiguous references when possible
...
See comment in getReferencedClassifier and importJavaSamInterface.kt for
explanation
2016-10-06 14:40:21 +03:00