Dmitry Petrov
a8c82b64a1
Do not check bounds in type alias expansion if checkBounds is false
...
This happens when we resolve bounds for type parameters, causing wrong
UPPER_BOUND_VIOLATED to be reported on type parameter whose bounds were
not resolved yet.
#KT-19601 Fixed Target versions 1.1.5
2017-08-11 11:29:59 +03:00
Denis Zharkov
ce37ab81ba
Fix types enhancement for properties' getters overrides in Java
...
Prior to the 1.1.4, nullability related annotations were stored
in types that became hard to maintain at some moment and
we got rid of it (see 57b7b91444 )
But enhancement for properties overrides stopped working
because there were effectively no annotations in the
resulting descriptor
#KT-19409 Fixed
#KT-19409 Fixed
2017-08-11 10:19:55 +07:00
Denis Zharkov
8898455352
Add tests on foreign annotations without them in classpath
...
#KT-19419 Fixed
2017-08-11 10:18:41 +07:00
Denis Zharkov
a82e313d14
Minor. Fix wrong target in test data for foreign annotations
2017-08-11 10:18:41 +07:00
Mikhael Bogdanov
6ca06265cf
Rename and disable test on JS
2017-08-10 16:16:28 +02:00
Dmitry Petrov
674d30cd76
Report deprecation on typealias companion object for deprecated alias
2017-08-10 15:45:44 +03:00
Dmitry Petrov
c180de563f
Support DslMarker on type aliases
2017-08-10 15:45:44 +03:00
Mikhael Bogdanov
3fd6dd3572
Add test for quoted class name
2017-08-10 12:10:25 +02:00
Denis Zharkov
ff0736f09e
Fix exception after combination of while (true) + stack-spilling
...
FixStack transformation divides on phases:
- Fixing stack before break/continue
- Fixing stack for inline markers/try-catch blocks
After the first stage all ALWAYS_TRUE markers are replaced
with simple GOTO's and if we're skipping break/continue edges
we won't reach the code after while (true) statement.
At the same time it's fine to not to skip them in the second phase
as the stack for them is already corrected in the first phase
#KT-19475 Fixed
2017-08-08 18:52:21 +07:00
Denis Zharkov
45d5f6a950
Add test for obsolete issue
...
#KT-19467 Obsolete
2017-08-08 18:52:21 +07:00
Mikhael Bogdanov
15f401a473
Copy annotation and attributes on class transformation during inline
2017-08-08 09:50:42 +02:00
Mikhail Zarechenskiy
e2dcf47b3b
Fix highlighting range of diagnostic in test data
...
Because of ae3497c6ce
2017-08-08 00:29:18 +03:00
Mikhail Zarechenskiy
ae3497c6ce
Reduce highlighting range for UNCHECKED_CAST
...
#KT-18985 Fixed
2017-08-07 18:49:58 +03:00
Mikhail Zarechenskiy
8f8143d3ed
Fix IAE for wrong use-site @file annotation
...
#EA-100189 Fixed
2017-08-07 18:49:57 +03:00
Mikhail Zarechenskiy
7ba073206d
Add test for obsolete issue about SAMs
...
#KT-11951 Obsolete
2017-08-07 18:36:07 +03:00
Mikhail Zarechenskiy
dc83e5ca3a
Fix test which is correctly work in old inference
2017-08-07 18:01:17 +03:00
Mikhail Zarechenskiy
3fb865e07c
Move test for NI to diagnostic tests and add "todo"
2017-08-07 18:01:16 +03:00
Mikhail Zarechenskiy
fb72726f08
Resolve right part of equality with given descriptors
2017-08-07 18:01:15 +03:00
Mikhail Zarechenskiy
e7cd615450
[NI] Introduce type depth in CS calculator to avoid SOE
2017-08-07 18:01:13 +03:00
Mikhail Zarechenskiy
cf75afba66
[NI] Fix type intersection for equal types
2017-08-07 18:01:12 +03:00
Mikhail Zarechenskiy
0d464f06d1
[NI] Consider CS as nullable if one of the types isn't subtype of Any
...
Note that this isn't fully correct, consider the following situation:
S : T, T : Any?
=> CS(S, T) = T, but for now it will be T?, which is reliable but not so specific as just T
2017-08-07 18:01:09 +03:00
Mikhail Zarechenskiy
39349abd39
[NI] Preserve name of parameters for functional types
2017-08-07 18:01:07 +03:00
Dmitry Petrov
c0d6eff97c
[NI] Select variable with proper non-trivial constraint first
2017-08-07 18:01:05 +03:00
Dmitry Petrov
4963580f90
[NI] Take into account return without expression in lambdas
2017-08-07 18:00:47 +03:00
Stanislav Erokhin
d58c6e245f
Minor. rename type parameters for debug purposes.
2017-08-07 18:00:43 +03:00
Dmitry Petrov
756f7d6e9c
[NI] Fix tests (was a type checker bug, see KT-18380)
2017-08-07 18:00:38 +03:00
Dmitry Petrov
26cc08be65
Fix anonymous function literals handling in type checker
...
- [NI] Create type info directly if the expected type is functional.
- Properly handle suspended function expected type.
2017-08-07 18:00:21 +03:00
Dmitry Petrov
6facdcb7ea
Minor: lambda arguments formatting
2017-08-07 18:00:20 +03:00
Dmitry Petrov
f637ebe9ff
Minor: formatting for lambda arguments
2017-08-07 18:00:14 +03:00
Mikhail Zarechenskiy
0b358fb693
Fix collection literals resolve in gradle-based projects
...
#KT-19441 Fixed
2017-08-07 17:52:08 +03:00
Nikolay Krasko
7d66af6583
Always assign shebang comment to same position before package
2017-08-07 12:17:20 +03:00
Nikolay Krasko
8d226594ff
Put comments and whitespaces under body in script files
...
It's more consistent to normal function body for IDE.
Doc comments in file beginning are now sticks to declarations
correctly.
Moving declarations at the end of scripts is fixed
2017-08-07 12:17:17 +03:00
Dmitry Petrov
2ed5a5e368
'when' should use intrinsics for '=='
...
#KT-19029 Fixed Target versions 1.1.5
#KT-18818 Fixed Target versions 1.1.5
2017-08-07 10:31:02 +03:00
Alexey Sedunov
e6f1a3ccf3
Minor: Use Kotlin reflection in usage printing and update test data
2017-08-02 13:08:06 +03:00
Dmitry Petrov
c5613888eb
Look into proper context when generating backing field access
...
Problem manifests when a class property name matches a companion object
property name, and class property is referenced in closure context.
#KT-19367 Fixed Target versions 1.1.5
2017-08-02 11:24:35 +03:00
Yan Zhulanow
3770786075
Minor: Fix test data for CLI test (defaultCacheImplementation option was added in Android Extensions)
2017-08-02 03:36:55 +03:00
Alexander Udalov
2e82bb5632
Use correct LanguageVersionSettings in MetadataSerializer
...
Also, require users of K2MetadataCompiler to pass "-Xmulti-platform"
manually. Gradle and Maven plugins already do that, so only users who
invoke kotlinc directly are going to be affected by this
#KT-19287 Fixed
2017-07-31 08:47:47 -07:00
Dmitry Petrov
9e6b706a03
Unwrap property imported from object on property access
...
#KT-18982 Fixed Target versions 1.1.5
2017-07-28 17:01:04 +03:00
Alexander Udalov
8b149db0ec
Drop deprecated KotlinPaths.getRuntimePath, use getStdlibPath instead
2017-07-28 14:16:48 +03:00
Alexander Udalov
1e6850f198
CLI: improve error message if libraries are not found in Kotlin home
...
Also support the '-kotlin-home' argument in kotlinc-js
#KT-18859 Fixed
2017-07-28 14:16:46 +03:00
Dmitry Petrov
67336653e0
Generate SAM wrappers only if they are required for a given argument
...
SAM interface wrapper for an argument is required,
if in the function descriptor for SAM adapter
type for the corresponding value parameter
doesn't match type of the corresponding value parameter
in the original (Java) descriptor.
#KT-19251 Fixed Target versions 1.1.5
2017-07-28 08:24:46 +03:00
Dmitry Petrov
5df461c7e0
Add test for KT-19246
...
The issue was fixed by
https://github.com/jetbrains/kotlin/commit/904c7f9c640ccb38c0becb40bd3b5dad3ac921bd
2017-07-28 08:24:46 +03:00
Nikolay Krasko
1b93e2030f
Create isCallee utility function
2017-07-28 01:28:56 +03:00
Andrius Semionovas
68659f5a32
Introduce error "ANNOTATION_USED_AS_ANNOTATION_ARGUMENT" along with QF
...
The relevant inspection has been removed
So #KT-18855 Fixed
2017-07-27 09:54:22 +03:00
Dmitry Petrov
b81ca31aae
Record resolved delegation call for primary ctor if single result
...
Do the same thing as for secondary constructor (looks like it was a
workaround for R&I bug that was used only for secondary constructors
for some reason).
#KT-17464 Fixed Target versions 1.1.5
2017-07-27 09:24:48 +03:00
Dmitry Petrov
c9ad290ad5
Do not store null for temporary in destructuring assignment
...
#KT-19256 Fixed Target versions 1.1.5
2017-07-27 09:02:26 +03:00
Dmitry Petrov
b867c46f72
Generate for-in-range loop as counter loop when possible
...
If an upper bound is a compile-time constant != Int.MAX_VALUE,
we can generate 'for (i in x..N)' as 'for (i in x until N+1)'.
2017-07-27 09:02:26 +03:00
Mikhael Bogdanov
ff676c050f
Properly generate inner classes when compiling source for inline
...
KT-19175: Compiler generates different bytecode when classes are compiled separately or together
#KT-19175 Fixed
2017-07-26 20:31:14 +02:00
Alexander Udalov
224df7a1ea
Change -Xload-jsr305-annotations argument to -Xjsr305-annotations={ignore|enable}
...
See https://youtrack.jetbrains.com/issue/KT-19229 for a complete
explanation
#KT-19229 Fixed
#KT-10942
2017-07-26 11:45:25 +03:00
Dmitry Petrov
0391c24ab2
Provide diagnostic for typealias using deprecated class or constructor
...
#KT-19205 Fixed Target versions 1.1.5
2017-07-26 09:02:45 +03:00