Dmitriy Novozhilov
49a42f9434
Fix #KT-28999. Prohibit type parameters on anonymous objects
2019-02-17 13:02:22 +03:00
Dmitriy Novozhilov
11e5ddf9ae
Add test for #KT-28999
2019-02-17 13:02:22 +03:00
victor.petukhov
30762a450a
Wrap diagnostic parameters to double quotes and split by comma instead of semicolon
2019-02-14 12:31:42 +03:00
victor.petukhov
46bd5ba107
Add alphabetical sorting diagnostics with same ranges
2019-02-14 12:31:42 +03:00
Dmitry Savvinov
5cb949ad7f
Fix language features in tests for gradual migration to 1.3 (part 2)
...
In 1.3, due to changes in language, testdata for some tests can be
different from 1.2
We want to simlultaneously test both versions, so instead of fixing
language version in such tests, we split them into two: one with fixed
1.2, another with fixed 1.3
2018-07-05 10:42:49 +03:00
Dmitry Petrov
4428798c61
Change diagnostic message and rename to NESTED_CLASS_DEPRECATED
2017-09-11 09:42:18 +03:00
Dmitry Petrov
ba2c3136bb
Prohibit non-inner classes in enum entries since 1.3
2017-09-11 09:42:18 +03:00
Dmitry Petrov
488a825349
Specialize diagnostic message for nested classes not allowed
2017-09-11 09:42:18 +03:00
Mikhail Zarechenskiy
da53317357
Fix exception when type parameters appear in object declaration
...
#KT-14536 Fixed
2017-03-14 01:10:00 +03:00
Denis Zharkov
a7fc32c8da
Add diagnostic on calling inner classes constructors without receiver
...
Otherwise there will be just an unresolved reference that doesn't give
any useful information
#KT-8959 Fixed
2017-03-01 09:59:01 +03:00
Denis Zharkov
a3baca829f
Drop KotlinTarget.INNER_CLASS entry
...
In most of the cases it was used together with CLASS_ONLY and vice versa
They only case when CLASS_ONLY was used without INNER_CLASS
is possibleParentTargetMap.COMPANION_KEYWORD.
But after diagnostic NESTED_OBJECT_NOT_ALLOWED has been introduced,
there's no sense in the restriction of exactly the companion's parent
For clarification see test data changed
2017-02-20 13:24:42 +03:00
Denis Zharkov
d0acb3674a
Fix rendered testData
...
New members in enum member scope
2016-05-16 15:38:13 +03:00
Alexander Udalov
1b8f934b54
Delete deprecated enum 'values' property
2016-02-19 22:28:44 +03:00
Alexander Udalov
239502368a
Update test data for tower resolution algorithm
...
- locals win
- unary calls to plus/minus are not supported in favor of unaryPlus/unaryMinus
- unqualified nested classes are temporarily reported as unresolved
- function without receiver win against extension function
- explicit import win against star import
2015-12-11 17:01:02 +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
Dmitry Petrov
7b432c878a
Diagnostics improvements for corner cases
...
(class/package qualifier in non-qualifier position).
2015-11-18 16:27:21 +03:00
Dmitry Petrov
9856af48ca
Drop createQualifier: testData update
2015-11-18 14:35:53 +03:00
Dmitry Petrov
3556f9751e
Reuse package/class qualifier prefix resolution for qualified expression resolution.
2015-11-18 14:35:52 +03:00
Valentin Kipyatkov
255373162d
KT-9666 Inner classes do not appear in type completion
...
#KT-9666
2015-10-22 18:48:15 +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
0cc861f00b
Exposed visibility checking, a set of exposed visibility tests, some test fixes
...
Effective visibility mechanism introduced.
Local is considered as public, java protected as Kotlin protected, java package private as Kotlin private.
2015-10-07 20:15:16 +03:00
Michael Nedzelsky
bc5c9065d2
fix tests in org.jetbrains.kotlin.checkers
2015-09-08 02:04:32 +03:00
Michael Bogdanov
2c2ec508d3
Redeclaration tests patched
2015-09-07 16:28:39 +03:00
Alexander Udalov
9882e86ecb
Don't render contents of enum entry classes in .txt tests, regenerate tests
...
They are irrelevant because cannot be accessed from the outside anyway
2015-08-28 21:11:06 +03:00
Stanislav Erokhin
2ee8f1c454
Change outer scope for nested class and object -- removed implicit outer class receiver.
...
#KT-5362 Fixed
#KT-8814 Fixed
2015-08-18 21:26:42 +03:00
Mikhail Glukhikh
4bd48c4796
Regular modifier checker implemented (initial version). A set of tests fixed accordingly.
...
Most of modifier diagnostic is expressed by REDUNDANT_MODIFIER, INCOMPATIBLE_MODIFIERS, REPEATED_MODIFIER, WRONG_MODIFIER_TARGET, WRONG_MODIFIER_PARENT.
A set of modifier diagnostics is not in use now (but not deleted yet).
2015-08-03 19:41:50 +03:00
Pavel V. Talanov
d2592e4a2c
Companion objects have public visibility by default
...
#KT-7114 Fixed
2015-06-02 16:23:03 +03:00
Mikhail Glukhikh
147bca3d22
Enum deprecated syntax detection implemented and integrated into DeclarationsChecker.
...
A lot of tests was changed to refactor deprecated syntax. Six new tests were added to check deprecated syntax detection.
Diagnostic for "enum entry uses deprecated super constructor": constructor is highlighted
Diagnostic for "enum entry uses deprecated or no delimiter".
One warning removed.
2015-05-15 16:13:34 +03:00
Dmitry Jemerov
8258d72e23
don't report USELESS_CAST in case of casting to superype using 'as'
2015-04-29 16:33:32 +02:00
Dmitry Jemerov
f374eec8f1
deprecating types after colon
2015-04-29 16:33:24 +02:00
Dmitry Jemerov
683d727c72
drop deprecated syntax for class objects
2015-04-27 15:14:33 +02:00
Nikolay Krasko
2946c1d6a8
KT-7271 Accessing an extension property of Char.Companion leads to ClassNotFoundException in runtime
...
#KT-7271 Fixed
2015-04-07 15:59:05 +03:00
Pavel V. Talanov
06916d98c6
default -> companion: replace all mentions of default and default object
2015-03-17 15:47:39 +03:00
Denis Zharkov
3fef4ad742
Minor, drop unneeded accept
2015-03-11 17:45:24 +03:00
Pavel V. Talanov
581e163031
Report warning on 'class object'
2015-03-10 18:21:32 +03:00
Pavel V. Talanov
5540f09751
Report default object specific diagnostics on 'default' modifier
2015-03-06 19:37:02 +03:00
Pavel V. Talanov
012d25dbca
Add test for soon to be deprecated 'class object' syntax
2015-03-06 19:37:00 +03:00
Pavel V. Talanov
59f192ef90
Replace 'class object' with 'default object' in renderers and test data
...
Includes changes to decompiled text
Old syntax is used in builtins and project code for now
2015-03-06 19:36:54 +03:00
Pavel V. Talanov
913724f0e9
Allow default object to be denoted with 'default' modifier
...
Report 'default' modifier in illegal positions
2015-03-06 12:41:50 +03:00
Nikolay Krasko
30a50746b5
Intrinsic default objects implementation: tests
2015-03-05 01:30:38 +03:00
Pavel V. Talanov
48fbce9582
Refactor: process mentions of class object
...
Rename usages that refer to "default object" concept now
Test data file names are left as is
2015-03-03 20:57:08 +03:00
Pavel V. Talanov
989f07962b
Write to trace in case class qualifier is a short reference to default object
...
This allows to fix some cases when there is a difference between explicit and short reference to default object
Fix shorten reference, optimize imports and import insert helper for default objects
ShortenReferences always transforms default object references to shorter form for now
Fix DescriptorUtils#getFqName() for default objects (affects test data mostly)
Fix DescriptorUtils#getImportableDescriptor()
2015-03-03 13:04:30 +03:00
Pavel V. Talanov
ffabe19229
Prohibit accessing nested classes/objects of class object using class literal
...
The fqname of class should be clear from code
Example: can't shorten A.Default.B.Default.C to A.B.C
Also fixes problem when nested class of enum class could be accessed via enum entry
2015-03-03 13:04:29 +03:00
Pavel V. Talanov
cceb5738c8
Can't omit default object name in imports and types
...
There should be only one way to denote a type (A.Default.B can't be denoted as A.B)
2015-03-03 13:04:28 +03:00
Pavel V. Talanov
2d59791cf2
Improve LazyClassDescriptor#getDefaultObjectDescriptor()
...
To cover the case when default object's name is not unique (redeclaration)
(Calling getClassifier is wrong for this case)
2015-02-16 15:38:44 +03:00
Pavel V. Talanov
514a551c04
Update diagnostics test for many class objects
2015-02-16 15:38:38 +03:00
Pavel V. Talanov
7b837e2631
Updata test data: txt files for diagnostics tests
2015-02-16 15:38:36 +03:00
Evgeny Gerashchenko
897854b3dc
KT-6671 Report unused constructor parameters
...
#KT-6671 fixed
2015-01-27 22:38:27 +03:00