Commit Graph

133 Commits

Author SHA1 Message Date
Denis Zharkov 6fca46a452 Allow inferring property type from its getter
#KT-550 Fixed
2016-11-15 09:30:13 +03:00
Denis Zharkov 4c69416f2b Report warning on unused entities that can be renamed to _
Currently it's all about lambda parameters/destructuring entries

 #KT-14347 In Progress
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
Valentin Kipyatkov ec51076355 DescriptorRenderer to render annotations for all types + separate option to render annotation arguments + use it in IdeDescriptorRenderers 2016-10-11 23:38:54 +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
Mikhail Glukhikh e7d290f726 Refactor PSI for destructuring declarations in for: they are now children of KtParameter and not instead of it 2016-10-06 21:03:19 +03:00
Denis Zharkov e975d32196 Implement resolution of desctructuring declarations in lambdas
#KT-5828 In Progress
2016-09-19 20:22:57 +03:00
Denis Zharkov ace3655824 Minor. Rename diagnostic tests: multiDeclarations -> destructuringDeclarations 2016-09-19 20:22:57 +03:00
Alexander Udalov 090d157f86 Update test data for data classes 2016-09-15 16:45:48 +03:00
Nikolay Krasko 300e0acd27 Report RETURN_NOT_ALLOWED and RETURN_IN_FUNCTION_WITH_EXPRESSION_BODY only on the return with label (KT-13340)
#KT-13340 Fixed
2016-08-05 13:16:05 +03:00
Alexander Udalov 0380b6cd88 Never resolve modality of members to SEALED 2016-07-26 21:16:15 +03:00
Denis Zharkov 4725dd3028 Implement recovery for incomplete expression before declaration
It's needed when declarations are parsed as a part of previous expression
(see tests)

Currently we apply this kind of recovery in a conservative way,
only when declaration starts at the next line, and while
the condition could be relaxed, there's no need to do this

 #KT-4948 Fixed
 #KT-7118 Fixed
2016-07-15 18:59:31 +03:00
Denis Zharkov 60a0cd8cfd Do not add error types as upper bounds in type parameter
#KT-10237 Fixed
 #KT-11821 Fixed
 #KT-8200 Fixed
2016-07-04 18:16:05 +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
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
Dmitry Petrov 440e02016b KT-11588 Type aliases
Fix diagnostic tests (renamed diagnostic message)
2016-05-20 14:17:25 +03:00
Denis Zharkov d0acb3674a Fix rendered testData
New members in enum member scope
2016-05-16 15:38:13 +03:00
Denis Zharkov 628f9050fb Report UNUSED_EXPRESSION on anonymous functions 2016-03-23 20:11:51 +03:00
Denis Zharkov 16736e3a0e Resolve anonymous functions in block as expression
#KT-7265 Fixed
2016-03-23 20:08:15 +03:00
Pavel V. Talanov 1affb05b7b Fix typechecker in case of "for ((a, b) in) { }"
Fixes NDFDE
2016-03-04 16:52:34 +03:00
Alexander Udalov 1b8f934b54 Delete deprecated enum 'values' property 2016-02-19 22:28:44 +03:00
Mikhail Glukhikh 883e2e4d2b KT-9498 extension: now type can be inferred for getter with expression body 2016-02-19 14:49:25 +03:00
Dmitry Petrov edf6a2142b Check local function declarations for overload conflicts.
In PSI unifier tests, disable errors for tests on local functions (as irrelevant).
2016-02-12 09:54:21 +03:00
Pavel V. Talanov 7c84225cc4 Fix typechecker when initializer of destructuring declaration is unresolved or missing 2016-02-04 15:08:39 +03:00
Mikhail Glukhikh 1b8f938260 Report EXPOSED_PROPERTY_TYPE on a property name only #KT-10760 Fixed 2016-01-26 19:04:13 +03:00
Mikhail Glukhikh b1e3e1c32d A few forgotten checks added for objects (function members effective visibility, multiple varargs) #KT-10753 Fixed 2016-01-26 19:04:08 +03:00
Ilya Gorbunov f4822cd757 Fix testData in compiler: add collections and ranges package to fq-names. 2016-01-22 05:54:38 +03:00
Dmitry Petrov 142e85be04 Prohibit functions (and constructors) with multiple vararg parameters. 2015-12-22 10:40:41 +03:00
Mikhail Glukhikh c8b50eec1e Enum.values: deprecation (warning) --> deprecation (error) 2015-12-11 11:11:42 +03:00
Mikhail Glukhikh dc60c62781 Enum.values is now deprecated but Enum.values() is no more deprecated 2015-11-23 17:29:36 +03:00
Mikhail Glukhikh c84b22396b Diagnostic 'final function with no body' deleted because it's redundant 2015-11-20 15:43:25 +03:00
Mikhail Glukhikh b5610eebae Diagnostic 'final property in interface' deleted because it's redundant 2015-11-20 15:43:22 +03:00
Mikhail Glukhikh cd1b58f2eb Final in interfaces: deprecation ---> error + relevant test fixes 2015-11-20 15:43:19 +03:00
Anton Sukhonosenko 141ffa27dc val / var are now forbidden on a loop multi declaration parameter #KT-6274 Fixed
VAL_OR_VAR_ON_LOOP_MULTI_PARAMETER error added
KtValVarKeywordOwner interface added for PSIs that have getValOrVarKeyword method
2015-11-03 15:30:50 +03:00
Michael Nedzelsky c123af75fd issue warning instead of error in case of finite bound or non-expansive inheritance violation in java code 2015-10-28 17:02:02 +03:00
Michael Nedzelsky 1c36090b6d check for violation of Finite Bound Restriction and Non-Expansive Inheritance Restriction 2015-10-20 20:06:07 +03:00
Alexey Tsvetkov dc27363452 Remove @annotation from test data 2015-10-19 20:45:01 +03:00
Alexey Tsvetkov 1973573a89 Remove @data from test data 2015-10-19 20:45:00 +03:00
Denis Zharkov 1c02231cda Regenerate rendered descriptors after transforming Enum.values to property 2015-10-17 17:46:16 +03:00
Mikhail Glukhikh f8a356747e Stdlib rename: 'name' and 'ordinal' are now properties in Enum, same name functions are deprecated 2015-10-14 20:40:13 +03:00
Mikhail Glukhikh 9c9ab671b3 Effective visibility: local is now considered private, TYPE_DEPENDS_ON_LOCAL_CLASS diagnostics removed as repeated #KT-9542 Fixed #KT-9526 Fixed 2015-10-14 18:00:10 +03:00
Dmitry Petrov 7e51fb8521 Check for exposed local classes (or objects) in type signatures 2015-10-12 15:24:54 +03:00
Andrey Breslav a2e5e60c68 TRAIT -> INTERFACE in diagnostics 2015-10-12 14:36:38 +03:00
Dmitry Petrov 5d9ee7efee Java 8 rules for method overrides:
- base class method wins against a (default) interface method,
so an abstract base class method should always be implemented
in a derived class;

- interface methods clash regardless of abstract/default
with possibly undefined behavior at run-time,
so a class or interface should always define its own method
for methods inherited from multiple interfaces and not from base class;

- meaningful diagnostics for class inheriting conflicting JVM signatures.
Since no override will happen under Java 8 rules,
ACCIDENTAL_OVERRIDE is misleading for this case;

- update testData.
2015-10-12 14:12:31 +03:00
Mikhail Glukhikh 361448de8b Rename: private / final property in trait --> in interface 2015-09-30 19:38:19 +03:00
Mikhail Glukhikh 7cf2840fe5 'final' is deprecated in interfaces 2015-09-29 13:05:08 +03:00
Yan Zhulanow 6db9344659 Fix compiler tests 2015-09-25 19:20:20 +03:00
Denis Zharkov 4850fd10f0 Regenerate test data containing rendered descriptors
Introduced '@' after each annotation
2015-09-18 10:14:39 +03:00
Alexander Udalov 085fc3bf87 Transform anonymous types even for public symbols
This became necessary when we removed the requirement to specify types for
public members, because otherwise everything fails not being able to locate the
anonymous class from another module

 #KT-9072 Fixed
 EA-72801
2015-09-11 19:51:42 +03:00
Denis Zharkov 676ca86ea4 Deprecate escaped modifiers and unescaped annotations 2015-09-08 12:11:30 +03:00