Commit Graph

56 Commits

Author SHA1 Message Date
Denis Zharkov f71a56e742 FIR: Fix test data after rewritten scope structure
Mostly, the semantics for statics/companions has been changed there
Fixed test data now is much closer to semantics of old FE
2020-05-15 16:04:44 +03:00
Dmitriy Novozhilov 7f02d57d88 [FIR] Correctly detect super type in delegated constructor call 2020-04-17 12:37: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
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 14204a842a Refactoring & clarification: implement new FIR tower resolver 2020-01-27 00:34:16 +03:00
Mikhail Glukhikh e644edfe84 [FIR] Handle unresolved callable references more correctly 2020-01-23 12:32:39 +03:00
Mikhail Glukhikh cef71b0349 [FIR] Add static / companion ambiguity to test data
This is temporary test data change until we prioritize this properly
2020-01-15 16:52:12 +03:00
Mikhail Glukhikh 9f1f743d55 FIR: fix test data after Make 'statics visible from nested classes' 2019-12-17 12:24:14 +03:00
Dmitriy Novozhilov 2536fa0cd5 [FIR-TEST] Add new testdata generated after changes in previous commit 2019-12-12 16:11:46 +03:00
Mikhail Zarechenskiy bcc8802014 [NI] Avoid constraints from expected type for effectively empty system
Expression will be checked against expected type later.

 Theoretically, this is not very good, but it aligns with the old
 inference, plus it helps avoiding multiple type mismatch diagnostics.
2019-04-17 12:55:12 +03:00
Dmitry Savvinov 76c651421b Deprecate visibility of static members inherited from Java
Now they are not visible by short name through companion objects, just
like classifiers in KT-21515

^KT-25333 In progress
2018-07-19 13:32:38 +03:00
Dmitry Savvinov d570b863ce Introduce deprecation of companion objects nested classes
Introdude deprecation as per KT-21515. Warning is reported on type
usage, that soon will became invisible. Quickfix by adding explicit
import is added.

Idea behind implementation is to mark scopes that are deprecated (see
ClassResolutionScopesSupport).

Then, during walk along hierarchy of scopes, look at deprecation status
of the scope that has provided this classifier.
Note that we also have to check if there are *some* non-deprecated
visibility paths (because we can see classifier by two paths, e.g. if
we've added explicit import) -- then this type reference shouldn't be
treated as deprecated.
2018-02-21 16:04:49 +03:00
Dmitry Savvinov ea72c76a37 [NI] Testdata changes after fixes in error types 2017-12-07 12:49:56 +03:00
Mikhail Zarechenskiy 328c67b9e8 Add separate diagnostic renderer results for tests with NI 2017-11-29 02:54:30 +03:00
Mikhail Zarechenskiy 8757298994 Add diagnostics to test data from NI 2017-11-29 02:54:26 +03:00
Mikhail Zarechenskiy a71238bf94 Place !WITH_NEW_INFERENCE directive to diagnostics test data 2017-11-29 02:53:49 +03:00
Mikhail Glukhikh cd717467f0 Nested classes are no more allowed inside any anonymous objects or local classes #KT-13510 Fixed
(cherry picked from commit 5c3ec6c)
2016-08-31 19:28:13 +03:00
Mikhail Glukhikh d94930149b Warning for open members in objects 2016-01-26 19:04:17 +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
Dmitry Jemerov 7c20630272 diagnostics for deprecated syntax of function type parameter list 2015-10-06 16:20:47 +02:00
Yan Zhulanow 6db9344659 Fix compiler tests 2015-09-25 19:20:20 +03:00
Alexander Udalov 085fc3bf87 Transform anonymous types even for public symbols
This became necessary when we removed the requirement to specify types for
public members, because otherwise everything fails not being able to locate the
anonymous class from another module

 #KT-9072 Fixed
 EA-72801
2015-09-11 19:51:42 +03:00
Michael Nedzelsky aa44606663 fix tests in org.jetbrains.kotlin.checkers (related to KT-9072) 2015-09-08 02:06:16 +03:00
Michael Nedzelsky bc5c9065d2 fix tests in org.jetbrains.kotlin.checkers 2015-09-08 02:04:32 +03:00
Stanislav Erokhin 9a435e332f Fix InnerClassesScopeWrapper - remove properties and functions from this scope. 2015-08-27 12:01:07 +03:00
Pavel V. Talanov d2592e4a2c Companion objects have public visibility by default
#KT-7114 Fixed
2015-06-02 16:23:03 +03:00
Dmitry Jemerov 4bdf598bfe compiler testdata: s/trait/interface 2015-05-12 19:43:17 +02:00
Dmitry Jemerov 9975bb8935 replace 'trait' keyword with 'interface' in user-visible messages and code generation tools 2015-05-12 11:49:37 +02:00
Dmitry Jemerov f374eec8f1 deprecating types after colon 2015-04-29 16:33:24 +02:00
Pavel V. Talanov 06916d98c6 default -> companion: replace all mentions of default and default object 2015-03-17 15:47:39 +03:00
Denis Zharkov f07566d30d Add warning for initializers with obsolete syntax
Expected 'init' keyword before class initializer
2015-03-11 17:45:26 +03:00
Pavel V. Talanov 59f192ef90 Replace 'class object' with 'default object' in renderers and test data
Includes changes to decompiled text
Old syntax is used in builtins and project code for now
2015-03-06 19:36:54 +03:00
Pavel V. Talanov ffabe19229 Prohibit accessing nested classes/objects of class object using class literal
The fqname of class should be clear from code
Example: can't shorten A.Default.B.Default.C to A.B.C
Also fixes problem when nested class of enum class could be accessed via enum entry
2015-03-03 13:04:29 +03:00
Pavel V. Talanov 7b837e2631 Updata test data: txt files for diagnostics tests 2015-02-16 15:38:36 +03:00
Evgeny Gerashchenko 897854b3dc KT-6671 Report unused constructor parameters
#KT-6671 fixed
2015-01-27 22:38:27 +03:00
Andrey Breslav 0eee83b6ec Lazy logs removed 2014-11-21 18:59:45 +03:00
Svetlana Isakova 2a83053355 Updated lazy log tests 2014-11-21 14:02:45 +03:00
Stanislav Erokhin b7c473f59e Update lazy.log files 2014-11-17 17:45:01 +03:00
Alexander Udalov 4f0d83a7fe Update lazy logs after field rename 2014-11-11 18:35:39 +03:00
Andrey Breslav 4892369cf4 Diagnostic tests are logging their lazy activity 2014-11-10 17:24:04 +02:00
Alexander Udalov 3a8ad45dec Append newline to EOF for .txt test data files
Reverts and fixes 102f0d3
2014-10-21 03:18:27 +04:00
Nikolay Krasko e796f88b38 Regenerate test data with constructed descriptors for diagnostics tests 2014-09-18 17:58:23 +04:00
Svetlana Isakova 9d366cb896 Prohibit local objects and enum classes
#KT-5402 Fixed
  #KT-4838 Fixed

Resolve type of object inside local object as special, not supertype('Any').
Changed visibility of constructor of anonymous object to 'internal' to be able to resolve the following:
fun box(): String {
    var foo = object {
        val bar = object {
            val baz = "ok"
        }
    }
    return foo.bar.baz
}
The containing declaration of property initializers is constructor, so 'baz' was invisible inside private constructor.
2014-09-01 12:32:52 +04:00
Svetlana Isakova eaeed78154 Resolve type of anonymous object in local object as local 2014-09-01 12:32:51 +04:00
Svetlana Isakova 7f33ad90a6 Report 'nested class accessed via instance reference' error 2014-09-01 12:32:50 +04:00
Svetlana Isakova 8c13a76805 KT-5527 Double TYPE_MISMATCH diagnostic when returns object
#KT-5527 Fixed
2014-07-25 21:17:31 +04:00
Svetlana Isakova 531d337486 changed default positioning strategy:
added special handling for JetObjectLiteralExpression
2013-12-27 16:02:15 +04:00
Alexander Udalov 310a70bf84 Report a separate diagnostic on inheritance from singletons 2013-12-02 19:56:16 +04:00
Alexander Udalov 29f3c4a1a0 Report upper bounds violation for objects, not only classes 2013-11-14 19:11:18 +04:00
Andrey Breslav 3e8031acbd Properly load objects nested into class objects from Java 2013-06-10 15:33:10 +04:00