Commit Graph

164 Commits

Author SHA1 Message Date
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
Mikhail Glukhikh 731fdecf06 private / protected / internal modifiers are deprecated in interfaces, relevant tests changed 2015-09-23 16:32:54 +03:00
Mikhail Glukhikh c24156ae84 "field": backing field usage deprecated warning, relevant diagnostics tests changed 2015-09-21 15:48:03 +03:00
Stanislav Erokhin 3f2e2deea1 Minor. Improver import resolve, when some error happened 2015-09-18 21:00:19 +03:00
Stanislav Erokhin 286d39b866 Import names from singleton but show CANNOT_IMPORT_ON_DEMAND_FROM_SINGLETON error 2015-09-18 21:00:17 +03:00
Michael Nedzelsky bc5c9065d2 fix tests in org.jetbrains.kotlin.checkers 2015-09-08 02:04:32 +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
Denis Zharkov 97af85da9c Change default upper bound of Java type parameters to Any!
#KT-7672 Fixed
2015-07-21 15:16:05 +03:00
Denis Zharkov 151231ef1a Adjust testData
Standard JDK collections purely implement kotlin.Mutable* with non-platform arguments
2015-07-09 16:36:47 +03:00
Denis Zharkov 0173cb1c17 Diagnostics test data fixed 2015-07-09 16:36:43 +03:00