Commit Graph

79 Commits

Author SHA1 Message Date
Denis Zharkov fa3b3e7a9a FIR: Fix false positive INAPPLICABLE_INFIX_MODIFIER 2020-04-21 09:48:03 +03:00
Vyacheslav Gerasimov bcefa68df0 Always checkout/checkin text files with lf endings
Different line endings on linux/windows prevents gradle from reusing
build cache since endings make task inputs completely different between
systems
2020-03-18 22:33:15 +03:00
Mikhail Glukhikh 8884cbe415 Introduce FIR_IDENTICAL for FIR vs old frontend tests #KT-36879 Fixed 2020-03-05 09:39:40 +03:00
Simon Ogorodnik 13132e69a3 [FIR] Start enum entries reworking 2020-01-10 10:23:50 +03:00
Pavel Kirpichenkov ac47c0cf3c [minor] Update test data for 1.4 2019-12-19 15:18:19 +03:00
Dmitriy Novozhilov 2536fa0cd5 [FIR-TEST] Add new testdata generated after changes in previous commit 2019-12-12 16:11:46 +03:00
Ilya Chernikov 2c02ee3d29 Rename test files to scripts to trigger proper scripting initialization
fix generation config accordingly
2019-02-10 13:31:57 +01:00
Mikhail Glukhikh ad44118605 Delay UNUSED_PARAMETER on main parameter until 1.4 (part of KT-26999) 2018-10-31 19:00:29 +03:00
Mikhail Glukhikh f3555daa60 Report UNUSED_PARAMETER on main parameter in 1.3+ #KT-26999 Fixed 2018-10-25 19:10:39 +03:00
Denis Zharkov 1cc0c12f87 Add language feature for extended main convention
- suspend
- parameterless

 #KT-17679 Fixed
 #KT-26574 Fixed
2018-09-12 09:49:25 +03:00
Denis Zharkov 2c920b732c Support main entry-point without arguments in frontend
#KT-26574 In Progress
2018-09-12 09:48:13 +03:00
Denis Zharkov c3f6ba3302 Support suspend fun main in JVM
#KT-17679 Fixed
2018-09-12 09:48:13 +03:00
Alexander Udalov 6f9441d3f4 Do not output empty non-root packages in tests with txt
Mostly to avoid listing every internal package in
kotlin-stdlib/kotlin-reflect, as in
https://github.com/JetBrains/kotlin/blob/acd5b62148d797ffd24c4811d1d663f0c1ae7885/compiler/testData/diagnostics/testsWithUnsignedTypes/conversions/conversionOfSignedToUnsigned.txt#L144
2018-08-06 13:43:32 +02:00
Dmitry Petrov 2c83718452 Prohibit having duplicate parameter names in functional types
#KT-15804 Fixed
2017-05-26 13:58:46 +03:00
Dmitry Petrov 5ccfbcbe22 KT-4960 Redeclaration is not reported for type parameters of interfaces
When resolving a class body for a class without a primary constructor
(e.g., an interface), no checks were performed for redeclarations
in the corresponding class header.
Creating & initializing a lexical scope of an appropriate kind will do it.
Note that since class has no primary constructor, only type parameters
could be redeclared (and that's KT-4960).
2017-04-13 15:57:24 +03:00
Dmitry Petrov 5021be351d KT-15878 Extension shadowed by member shouldn't be reported for infix/operator extensions when member is non-infix/operator 2017-01-23 16:46:43 +03:00
Dmitry Petrov 954204da82 KT-1560
Report warning on extensions shadowed by members.
2017-01-16 17:25:13 +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
Ilya Chernikov 846797ff61 Switch to templates in the separate script runtime 2016-10-12 15:38:52 +02:00
Dmitry Petrov 06101dba52 KT-13961 REDECLARATION not reported on private-in-file 'foo' vs public 'foo' in different file
Private-in-file declarations conflict with public overload-equivalent declarations
in other files in the same package.

Move functions for grouping possible redeclarations to OverloadResolver
(since they are used only there).

Refactor redeclarations / conflicting overloads reporting.
2016-10-03 11:50:29 +03:00
Mikhail Zarechenskiy 0ba2d374bc Create standard script definition from standard template
Now each script without specified template has a StandardSriptTemplate
class as a base one. This allows to generalize script codegen and
resolve.
2016-09-20 15:44:44 +03:00
Dmitry Petrov 796d11c860 ClassDescriptor is now a super-interface for ClassConstructorDescriptor and TypeAliasConstructorDescriptor. 2016-09-20 10:55:36 +03:00
Denis Zharkov 257417bc4a Minor. Lower type aliase declarations priority
There are several reasons for doing this:
- See org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedMemberScope.computeDescriptors,
  classifiers are being deserialized in the last turn, so it's necessary to preserve consistent order
- Their priority should be close to classes
2016-09-09 10:27:35 +03:00
Dmitry Petrov 12710bec2f Redeclaration errors for type aliases: type alias vs function. 2016-06-10 10:25:08 +03:00
Dmitry Petrov 5ad4c8b9c7 Redeclaration errors for type aliases: type alias vs property. 2016-06-10 10:25:08 +03:00
Dmitry Petrov 44829a61e7 Report redeclaration errors for type aliases vs class/interface/object. 2016-06-09 10:27:51 +03:00
Mikhail Glukhikh 8e18165065 KT-12152 : constructor consistency analysis, base cases 2016-06-03 09:45:37 +03:00
Denis Zharkov d0acb3674a Fix rendered testData
New members in enum member scope
2016-05-16 15:38:13 +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 1b8f934b54 Delete deprecated enum 'values' property 2016-02-19 22:28:44 +03:00
Dmitry Petrov aed2f2b993 Property vs classifier conflict.
TODO get rid of duplicate diagnostics
(looks like OverloadResolver and DeclarationResolver are partially redundant; refactor them).
2016-02-11 10:32:46 +03:00
Dmitry Petrov 65f754ffca Fix KT-10764 IDEA doesn't show overload conflict between constructor and function...
When checking for overloads in package, consider functions and top-level class constructors as possibly conflicting between each other. NB OverloadUtil uses containing package scope from module descriptor.

Change diagnostic message for CONFLICTING_OVERLOAD: it's misleading in case of fun vs constructor conflict.

Add custom multifile test for diagnostics in IDE (probably not the best; should preprocess file content if it's required to check highlighting in multiple files, not only in the first file).

Add test for KT-10765 Incremental compilation misses overload conflict between constructor and function ...
2016-02-02 16:21:26 +03:00
Mikhail Glukhikh c8b50eec1e Enum.values: deprecation (warning) --> deprecation (error) 2015-12-11 11:11:42 +03:00
Pavel V. Talanov 337701670c Refactor script registering in frontend and jvm backend 2015-11-30 18:21:02 +03:00
Yan Zhulanow 9d1af5a17e Fix tests: "infix modifier required" and "operator modifier required" errors 2015-11-27 15:51:11 +03:00
Stanislav Erokhin a502405779 Fixed scope creations for properties scopes. 2015-11-26 16:21:46 +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
Pavel V. Talanov 2b955bc6ec Script refactoring, frontend tests: changes according to semantic changes in scripts
Add checker tests for scripts
2015-11-19 22:56:57 +03:00
Alexander Udalov 426bddb54e Move OverridingUtil#getUpperBound to OverloadUtil, add tests on overloads 2015-10-28 19:12:05 +03:00
Michael Nedzelsky 63f84fc60e fix KT-9733 No error shown for 2 "main" functions in the same file
#KT-9733 Fixed
2015-10-26 21:30:24 +03:00
Dmitry Petrov 829fc6938a KT-9547: private package member can conflict only with the members
declared in the same file.
Cleanup OverloadUtil stuff.
Update testData.
2015-10-22 10:45:49 +03:00
Denis Zharkov 1c02231cda Regenerate rendered descriptors after transforming Enum.values to property 2015-10-17 17:46:16 +03:00
Michael Nedzelsky 890ae3e914 Make single-file classes tolerant to having many main()'s 2015-10-15 15:46:26 +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
Pavel V. Talanov 47cca7db1f Test data: adjust test data after prohibiting properties with typeparameters not used in receiver 2015-10-14 13:42:13 +03:00
Dmitry Jemerov 7c20630272 diagnostics for deprecated syntax of function type parameter list 2015-10-06 16:20:47 +02: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
Pavel V. Talanov d2592e4a2c Companion objects have public visibility by default
#KT-7114 Fixed
2015-06-02 16:23:03 +03:00