Mikhail Glukhikh
036b6c63f6
[FIR] During resolve, set correctly property reference type in delegate
2020-04-03 13:18:47 +03:00
FenstonSingel
b7d8e879a6
[FIR] Support 4 diagnostics for pairs of modifiers
...
In particular, this commit includes:
* Attempt to abstract access to FirSourceElement via FirModifier
* Add more visit functions to DeclarationCheckersDiagnosticComponent
* Add messages+factories for 4 modifier-related errors and warnings
* Introduce FirModifierChecker
2020-03-27 12:34:29 +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
c29c140a9c
[FIR] Qualifier resolve
2020-02-19 17:53:44 +03:00
Ilya Chernikov
6356807997
Reapply "Only create descriptors for candidates with lambda args"
...
#KT-36247 fixed
A lot of testdata changed because significanly less (error) descriptors
are created for unresolved types, so diagnostics became different.
2020-02-14 11:41:30 +01:00
Mikhail Glukhikh
69ecbd93a9
[FIR] Fix type alias handling in qualifier position
2020-01-23 12:32:39 +03:00
Mikhail Glukhikh
e644edfe84
[FIR] Handle unresolved callable references more correctly
2020-01-23 12:32:39 +03:00
Mikhail Glukhikh
f0ced642d9
[FIR] Use static & qualified scopes to access qualified callables
...
This commit provides more correct logic for creating scopes based
on FirResolvedQualifier & eliminates QualifiedReceiverTowerDataConsumer
2020-01-15 16:52:12 +03:00
Dmitriy Novozhilov
2536fa0cd5
[FIR-TEST] Add new testdata generated after changes in previous commit
2019-12-12 16:11:46 +03:00
victor.petukhov
46bd5ba107
Add alphabetical sorting diagnostics with same ranges
2019-02-14 12:31:42 +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
Alexander Udalov
d1e1e274d9
Render property accessor annotations in .txt test data
...
If property accessor rendering is disabled in a test, render annotations
on accessors as use-site-targeted, as was done with
`@setparam:`-annotations. Otherwise they were lost
2018-10-24 18:17:12 +02: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
Alexander Udalov
fe2251bfca
Run classifier usage checkers on function types
2018-08-03 18:03:52 +02:00
Alexander Udalov
dcbb8045bd
Disallow function types with big arity on JVM if LV < 1.3 or API < 1.3
...
The implementation is a bit obscure because this worked on JS since
Kotlin 1.0 and we should not break that; however, on JVM, a diagnostic
will be reported with old language/API version
#KT-25241 Fixed
2018-07-16 10:41:27 +02:00
Alexander Udalov
1f0d3d9c7c
Load WasExperimental values correctly for associated declarations
...
For example, if a class is `@SinceKotlin("X")
@WasExperimental(M::class)`, then its constructor should also be
accessible if API < X, provided that the opt-in to M is given
2018-05-07 11:37:31 +02:00
Mikhail Glukhikh
e76debb12b
Report UNUSED_PARAMETER in setter #KT-21129 Fixed
2018-05-04 18:04:57 +03:00
Stanislav Erokhin
2b186909d4
Migrate diagnostic names for header/impl
2017-09-15 18:29:29 +03:00
Mikhail Glukhikh
dd8bed8b46
Migration: expect/actual in diagnostic tests
2017-09-15 18:28:07 +03:00
Alexander Udalov
2877314313
Support "::foo" as a short-hand for "this::foo"
...
#KT-15667 Fixed
2017-09-08 10:59:44 +03:00
Dmitry Petrov
a2db4dc0d5
Fix incremental compilation problems related to type alias constructors
...
1. Determine source element for descriptors with NO_SOURCE recursively.
2. Always provide type abbreviation for type alias constructor
return type.
#KT-15495 Fixed
2017-05-18 10:55:16 +03:00
Mikhail Zarechenskiy
7541a3754d
Move SAM constructors to synthetic scope
2017-05-05 21:30:35 +03:00
Alexander Udalov
d21d362f0f
Allow enum entries in double colon LHS with LV = 1.0
...
#KT-16782 Fixed
2017-03-10 19:44:00 +03:00
Alexander Udalov
0111c4d581
Allow references to nested class constructors in objects in LV = 1.0
...
#KT-16598 Fixed
2017-03-06 11:03:24 +03:00
Stanislav Erokhin
b6fa10cf9e
Disable some features when LV=1.1 API=1.0.
...
Feature list:
- bound callable references
- local delegated properties
- coroutines.
#KT-16017 Fixed
2017-02-13 20:29:38 +03:00
Alexander Udalov
4f36376291
Do not report KCLASS_WITH_NULLABLE_ARGUMENT_IN_SIGNATURE anymore
...
It was only reported in already erroneous cases
2017-01-18 18:21:30 +03:00
Alexander Udalov
6a352a1da7
Report error on nullable type alias in class literal
...
#KT-15736 Fixed
2017-01-18 18:21:28 +03:00
Stanislav Erokhin
0ef1234f2e
Added special error for incorrect KClass type in signatures.
2017-01-16 05:44:46 +03:00
Alexander Udalov
e4e50017d0
Render header/impl on properties in tests and diagnostic messages
...
As a side effect, header/impl and some other modifiers on functions are now
rendered in a different, more natural, order
2016-12-26 17:06:24 +03:00
Dmitry Petrov
33ed98a0d3
Update typing rules for class literal expressions.
...
C::class : KClass<C>
expr: T => expr::class : KClass<out T>
NB: this means Obj::class : KClass<out Obj> for object Obj.
2016-12-19 10:41:49 +03:00
Stanislav Erokhin
59efedf610
Rename platform to header.
2016-12-13 18:00:00 +03:00
Alexander Udalov
751949db69
Support platform/impl modifiers for classes
...
Do not report "unused parameter" for parameters of platform declarations. Do
not allow platform class constructors to have val/var parameters or have an
explicit delegation call to another constructor. Do not allow platform classes
to have 'init' blocks.
Also suppress the "supertype not initialized" error for platform classes: the
supertype should be initialized in the impl class
2016-11-25 20:50:19 +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
Ilya Chernikov
846797ff61
Switch to templates in the separate script runtime
2016-10-12 15:38:52 +02:00
Alexander Udalov
777004a0e2
Fix test data after merge
2016-10-12 12:52:38 +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
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
Alexander Udalov
73652f309f
Do not create synthesized equals/hashCode/toString in data classes in compatibility mode
...
To simplify migration from 1.0 to 1.1, do not allow data classes to
automatically implement abstract equals/hashCode/toString declared in
super-interfaces (KT-11306) if "-language-version 1.0" is specified
2016-10-04 10:24:41 +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
Alexander Udalov
090d157f86
Update test data for data classes
2016-09-15 16:45:48 +03:00
Michael Bogdanov
8d2ffb2dab
Fix wrong "InlineProperties are unsupported at this language level" error on inline functions when inline properties are disabled
2016-09-07 17:39:09 +03:00
Alexander Udalov
191dfa1f2b
Minor, add test that language feature settings are used in local analysis
...
This test checks that the correct LanguageFeatureSettings instance (not
LanguageVersion.LATEST) is being passed to
createContainerForLazyLocalClassifierAnalyzer
2016-07-05 19:54:16 +03:00
Mikhael Bogdanov
853c4d4453
Added language feature check for inline properties
2016-06-24 17:05:52 +03:00
Alexander Udalov
e68de436bb
Allow data classes to inherit from other classes
...
#KT-10330 Fixed
2016-06-22 21:35:57 +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
d90b40c661
Use LanguageFeatureSettings instead of custom option for bound callable references
2016-06-07 12:41:29 +03:00
Mikhael Bogdanov
bdc0b6b308
Local delegated properties moved to language feature option
2016-05-31 15:27:55 +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