Commit Graph

99 Commits

Author SHA1 Message Date
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
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 7b837e2631 Updata test data: txt files for diagnostics tests 2015-02-16 15:38:36 +03:00
Andrey Breslav da639039bd KT-6698 Bad class file when using a star-projection on a Java's recursive generic parameter
#KT-6698 Fixed
2015-02-02 19:52:00 +03:00
Evgeny Gerashchenko 22f4caa78d Fixed test for KT-6530 Do not report "useless cast" when RHS is unresolved 2015-01-12 21:34:12 +03:00
Evgeny Gerashchenko a3fdce8131 Highlighting "as Foo" for useless casts in gray.
#KT-6070 fixed
2014-12-08 17:30:47 +03:00
Alexander Udalov 8dae1b62dd Add CharSequence.subSequence
This is done primarily for JVM interoperability, otherwise it's impossible to
inherit from CharSequence there. On JS subSequence at the moment just invokes
substring.

 #KT-5956 Fixed
2014-11-27 20:38:19 +03:00
Alexander Udalov 4d95bcfc7e Rename CharSequence.get to charAt
This is done for JVM interoperability. There's still a member function
String.get() and an extension function "get" on CharSequence

 #KT-1730 Fixed
 #KT-5389 Fixed
2014-11-27 20:38:18 +03:00
Alexander Udalov a7b88e9485 Make CharSequence.length a function instead of property
And String.length as well.

This is done for JVM interoperability: java.lang.CharSequence is an open class
and has a function 'length()' which should be implemented in subclasses
somehow.

A minor unexpected effect of this is that String.length() is now a compile-time
constant (it wasn't such as a property because properties are not supported in
compile-time constant evaluation)

 #KT-3571 Fixed
2014-11-27 20:38:17 +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 65c9ea2465 Fix variance problems. 2014-11-17 17:45:05 +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
Alexander Udalov 102f0d3470 Regenerate .txt testData
Add newline to EOF, trim trailing spaces
2014-10-21 00:16:08 +04:00
Alexander Udalov ae401cac0f Prohibit type parameters for enum classes
#KT-5696 Fixed
2014-10-21 00:16:07 +04:00
Svetlana Isakova a47729c626 KT-5455 Need warning about redundant type cast
#KT-5455 Fixed
2014-10-18 11:06:52 +04:00
Alexander Udalov 6ddc063a76 Regenerate test data on enums
Now they have final equals, hashCode and compareTo
2014-10-17 21:27:24 +04:00
Andrey Breslav 6564231040 Descriptor test data for diagnostic tests fixed 2014-10-13 15:38:10 +04:00
Svetlana Isakova ce01c61811 Rename: auto cast -> smart cast 2014-10-01 18:52:52 +04:00
Nikolay Krasko e796f88b38 Regenerate test data with constructed descriptors for diagnostics tests 2014-09-18 17:58:23 +04:00
Andrey Breslav 8be40c29cf CYCLIC_INHERITANCE_HIERARCHY reworked
We do not try to recover too gracefully from a cyclic hierarchy any more:
we simply remove all the edges that belong to a cycle instead of intelligently finding one most convenient edge to cut.
This is done in both lazy and eager resolve to keep tests passing.
2014-03-17 21:55:15 +04:00
Alexander Udalov ec30d52978 Delete Hashable, pull up its members to Any
Extensions on nullable types remain in Library.kt

 #KT-1741 Obsolete
 #KT-2805 Obsolete
 #KT-1365 Fixed
 #KT-4517 In Progress
2014-03-02 19:54:08 +04:00
Natalia Ukhorskaya 7a9d822070 'As' function for constants 2013-12-17 15:00:30 +04:00
Svetlana Isakova c30259dfbe added info about smart casts to diagnostic tests 2013-12-11 19:53:50 +04:00
Andrey Breslav a9134f8eff Do not allow inference of type arguments on the rhs if there's no information available 2013-09-13 22:41:06 +02:00
Andrey Breslav 5c86a5bd7c Allow bare types on the right-hand side of as/as?/is/!is 2013-09-13 22:41:06 +02:00
Andrey Breslav fca6182288 Fixed the case of "Any is/as List<*>" for erased cast diagnostic 2013-09-06 13:37:09 +04:00
Andrey Breslav e3175c66e8 Fixing failed tests: do not report anything on casts that can never succeed 2013-09-05 15:03:37 +04:00
Andrey Breslav e3079ac667 Erased casts supported 2013-09-05 14:17:33 +04:00
Andrey Breslav a28d211442 'Cast can never succeed' diagnostics improved 2013-09-05 14:17:32 +04:00
Vladimir Rudev 290681ceee KT-614 Emit a warning when non-null type is checked for instance of nullable type
#KT-614 Fixed
2013-01-15 23:44:20 +04:00
Evgeny Gerashchenko e691a0bc93 Considering variances when checking for erased casts. 2012-11-08 22:02:52 +04:00
Evgeny Gerashchenko 992d84d920 Fixed IsReified diagnostic test. Now it really checks for reified type. 2012-11-08 22:02:51 +04:00
Evgeny Gerashchenko 266313a02e Replaced List and Collection with mutable analogs. 2012-11-08 22:02:51 +04:00
Svetlana Isakova 7c828b9ff7 diagnostic tests changes after collections mapping 2012-09-05 18:55:16 +04:00
Andrey Breslav 859dbc87d4 Fix CANNOT_CHECK_FOR_ERASED for when() 2012-08-31 14:23:02 +04:00
Andrey Breslav 3d8d92c7d3 JetDiagnosticsTest migrated to TestGenerator
- test data files renamed from *.jet to *.kt
2012-07-10 14:48:11 +04:00
Andrey Breslav 91606a3901 Introduce 'reified' instead of 'erased' 2012-06-05 20:19:07 +04:00
Stepan Koltsov 3748507ac1 disable +JDK macro in JetDiagnosticsTest and fix (actually hide) revealed bugs
+JDK was not very helpful
2012-03-12 22:54:24 +04:00
svtk 70d0cd882b KT-650 Prohibit creating class without constructor 2012-01-24 16:58:29 +04:00
Andrey Breslav 41fd43b5e5 GreatSyntacticShift: Syntax for function types, function literals, when and tuples
Bug:
fun loop(var times : Int) {
   while(times > 0) {
        val u : (value : Int) -> Unit = { // This arrow is confusing the lookahead
            System.out?.println(it)
        }
        u(times--)
   }
}
2011-12-20 22:55:25 +04:00
Stepan Koltsov 6115d77d41 one more test for instanceof erased 2011-12-01 18:23:52 +04:00
Stepan Koltsov b6e231a2bd better class name 2011-12-01 18:20:59 +04:00
Stepan Koltsov 52c1e9a950 one more case of KT-445 Don't allow deep instanceof for erased parameters
===
(a : List<out Any>) is List<out Int>
===
2011-12-01 17:41:13 +04:00
Andrey Breslav aad2d17cd8 'quick' directory renamed to 'tests' which reflects its contents 2011-12-01 14:40:31 +03:00