Mikhail Glukhikh
f7b5d67543
KT-12152 : constructor consistency: handle non-final classes
2016-06-03 09:45:41 +03:00
Denis Zharkov
bc1b34a989
Add additional visibility check for synthetic extensions
...
Use extension receiver as dispatch one, because it is effectively dispatch
(after some desugaring)
2016-03-31 14:51:57 +03:00
Denis Zharkov
92be4aee9c
Prohibit protected constructor calls that are not super-calls in subtypes
...
#KT-11649 Fixed
2016-03-31 14:51:57 +03:00
Denis Zharkov
5056c43975
Do not check receiver for protected constructor calls
...
Checks for protected constructors should be performed manually,
because they are rather complex
2016-03-31 14:51:57 +03:00
Denis Zharkov
5bf336474d
Respect receiver-dependent visibility when selecting smart-cast type
2016-03-31 14:51:57 +03:00
Denis Zharkov
935355ad2f
Refine isVisible for protected visibility
...
#KT-7437 Fixed
#KT-7971 Fixed
#KT-7051 Fixed
#KT-6125 Fixed
#KT-6186 Fixed
2016-03-31 14:51:57 +03:00
Alexander Udalov
e915e1548c
Fix multiple 'unresolved java classifier' errors
...
Use the same component (NotFoundClasses) as in loading of compiled Kotlin
symbols.
Some tests were changed to avoid a diagnostic that is now reported when a
non-found class is encountered in a signature (e.g. staticMethod.1.java where
JDK seems to be not configured)
#KT-10493 Fixed
#KT-10820 Fixed
#KT-11368 Fixed
2016-03-28 14:13:59 +03:00
Stanislav Erokhin
7de2013a3e
KT-3856 Wrong inner class inaccessible diagnostic for extension to outer class
...
#KT-3856 Fixed
2016-02-20 14:55:15 +03:00
Pavel V. Talanov
7d98103c0c
overriddenDescriptors is empty for java static property and function declarations
...
Fake overrides are still created for java static with non-empty overriddenDescriptors
Add tests for inheriting visibility for java static members
Add test: check that java static declarations that shadow deprecated declarations should not be deprecated
Add test for corner case where "overriding" java static constant led to incorrect type in inheritor
Fix test data for existing tests
2016-02-11 14:08:14 +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
Valentin Kipyatkov
47041885ca
Do not use incorrect import
2016-01-14 17:05:13 +03:00
Zalim Bashorov
8fa2e28729
Add usages of inherited static members from nested object
2015-12-15 20:07:33 +03:00
Zalim Bashorov
51a8d5b9f0
Allow to use static members from companion object's parents
2015-12-15 19:41:15 +03:00
Zalim Bashorov
69c2668530
Don't allow to use own members when resolve super constructor call in (companion) object
2015-12-15 19:41:14 +03:00
Zalim Bashorov
e9ea4cc953
Don't allow to use own nested classes when resolve header of (companion) object
2015-12-15 19:41:13 +03:00
Denis Zharkov
b4bb92d136
Fix overload resolution ambiguity for types intersection
...
There are two different forms of types intestion:
1. Type parameters with multiple bounds
2. Smart casts
The problem was that when member scope of type intersection contained
effective duplicates and that lead to overload resolution ambiguity in
strange cases like `x.hashCode()`
For first type we do effectively the same thing as when building member
scope for class extending several interfaces: group all descriptors by
both-way-overridability relation and then choose most-specific in each
group.
For smart casts we do basically the same thing but with special
treatments:
1. From all descriptors that _equal_ to most specific we choose
the one that works without smartcast if possible (i.e. we choose first from candidates list)
2. If smart-cast value seems to be unstable we use only member scope
of receiver type + all descriptors from smart cast possible types
that has incompatible signature. If we'd include all of them and
choose one as more specific, and it would lead to false
SMART_CAST_IMPOSIBLE (see test unstableSmartCast.kt)
#KT-3996 Fixed
#KT-10315 Fixed
2015-12-15 16:18:31 +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
Zalim Bashorov
5bf8b4d946
Allow to use "static" part of class in own constructors by short name, including in primary constructor
2015-12-09 21:42:32 +03:00
Mikhail Glukhikh
ea4f167091
Calls to non-@JvmStatic protected members of companion objects from subclasses are now errors (unsupported yet)
2015-11-27 15:58:38 +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
63fa71606f
Create new Tower Resolve
2015-11-26 16:21:49 +03:00
Stanislav Erokhin
a502405779
Fixed scope creations for properties scopes.
2015-11-26 16:21:46 +03:00
Mikhail Glukhikh
f81a5c06ea
Protected in allowed in companion objects but forbidden in other objects, relevant test fixes
2015-11-20 16:32:59 +03:00
Dmitry Petrov
9856af48ca
Drop createQualifier: testData update
2015-11-18 14:35:53 +03:00
Denis Zharkov
e920ce709b
Render captured type parameters in verbose mode
2015-11-13 14:59:04 +03:00
Alexey Tsvetkov
7c54024a22
Fix private setter visibility for generic class
...
#KT-8888 fixed
2015-10-26 18:36:59 +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
Mikhail Glukhikh
d6988ad69e
Get rid of FIELD_IDENTIFIER at syntax level, two errors dropped, a set of tests fixed / deleted #KT-9539 Fixed
2015-10-21 16:36:55 +03:00
Denis Zharkov
28c46b73f1
Rename some of builtin parameters
2015-10-17 17:46:16 +03:00
Stanislav Erokhin
d5dbc9638d
Added static methods, nested classes and companion object from superclasses.
2015-10-16 20:42:34 +03:00
Mikhail Glukhikh
78cfeb0d7d
Stdlib rename: List.indexOf(T), List.lastIndexOf(T), MutableCollection.removeAll(Collection<T>), MutableCollection.retainAll(Collection<T>)
2015-10-14 20:40:09 +03:00
Denis Zharkov
6322198a11
Revert 'isEmpty' transformation
2015-10-14 20:40:01 +03:00
Denis Zharkov
f0e3fd617d
Adjust testData to CharSequence.length transformation
2015-10-14 20:39:35 +03:00
Denis Zharkov
6f4579213c
Adjust rendered descriptors after remove/charAt transformations
2015-10-11 19:59:30 +03:00
Denis Zharkov
cfc9d19825
Transform Collection.isEmpty and Map.Entry.key/value to properties
2015-10-10 12:29:14 +03:00
Mikhail Glukhikh
6914d09297
Old backing field with dollar is now forbidden
2015-10-09 21:06:26 +03:00
Zalim Bashorov
e9b138557b
Report error when try to access to static field which come from many sources
2015-10-09 15:00:59 +03:00
Denis Zharkov
14f93a88c4
Adjust rendered collections desciptors to contains* transformation
2015-10-09 14:40:34 +03:00
Zalim Bashorov
ae2831338b
Load Java static members from parents
2015-10-08 19:33:29 +03:00
Dmitry Petrov
51225d3556
Test for KT-9430: proper visibility of protected members of base class
...
in child classes
2015-10-08 18:08:52 +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
Mikhail Glukhikh
cba6870f52
protected & internal are now forbidden in interfaces
2015-10-07 11:57:14 +03:00
Mikhail Glukhikh
846d7cac69
protected is deprecated inside objects and forbidden inside annotations and enum entries
2015-10-07 10:21:11 +03:00
Denis Zharkov
c21d827326
Adjust various testData to size transformation
2015-10-07 08:46:34 +03:00
Denis Zharkov
547aa2cda6
Load special java methods as properites
...
Currently only those that override special builtin properties (e.g. `Collection.size`)
Their modality is defined by method's modality
2015-10-06 23:56:17 +03:00
Pavel V. Talanov
37d5c4b223
Allow to import members from object by name
...
Wrap object members so they do not require dispatch receiver
Hack jvm backend to make it work
2015-10-06 16:31:21 +03:00
Zalim Bashorov
073b10072a
Minor: fix testdata
2015-10-01 14:57:26 +03:00
Mikhail Glukhikh
4e91f2ffb7
'open' + 'private' and 'abstract' + 'private' are now incompatible for functions and properties #KT-9324 Fixed
2015-09-29 13:05:11 +03:00
Michael Nedzelsky
1986d8d7f8
add test for private in file
2015-09-25 21:16:04 +03:00
Mikhail Glukhikh
ebfb6c8468
private and override are no more compatible
2015-09-25 18:57:55 +03:00