Commit Graph

103 Commits

Author SHA1 Message Date
Pavel V. Talanov 06916d98c6 default -> companion: replace all mentions of default and default object 2015-03-17 15:47:39 +03:00
Dmitry Jemerov 07381b765f rename Numbers.kt to Primitives.kt as it now contains Char which is not a number 2015-03-11 12:40:39 +01:00
Dmitry Jemerov 46dbf005df update testdata for the newly appeared Double.mod(Char) method 2015-03-06 18:02:13 +01: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
Nikolay Krasko 518c35fae1 Intrinsic default objects implementation: old test data modification 2015-03-05 01:30:39 +03:00
Pavel V. Talanov 7b837e2631 Updata test data: txt files for diagnostics tests 2015-02-16 15:38:36 +03:00
Andrey Breslav 0e972acf8c == turned into a safe-call 2015-02-10 06:55:46 +01:00
Svetlana Isakova b7806be8b5 Fixed test data for builtin-classes 2014-12-16 20:01:38 +03:00
Svetlana Isakova da8fdbd23e More tests for varargs updated 2014-12-12 23:08:28 +03:00
Denis Zharkov d345ba05dd Added inline function "Array" into stdlib
It has the same signature and semantics as Array constructor had
Also made Array constructor private and accepting no arguments
2014-12-11 16:04:03 +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
Alexander Udalov 93696ff9bd Make Array.indices extension property, move to stdlib
This is not something that needs to be intrinsified. Note that compiler
optimizations are still possible and the fact whether 'indices' is a member or
an extension is irrelevant to the optimizer
2014-11-17 15:20:44 +03:00
Alexander Udalov 128c938965 Make Array.size() a function instead of a property
Also add a deprecated extension property to help migration. This is done to
unify getting size of arrays and collections
2014-11-17 15:02:38 +03:00
Pavel V. Talanov d2cfcfa659 Fix test data after changes to renderer and descriptors 2014-11-14 17:09:05 +03:00
Denis Zharkov 8d47bdfebb Made <T> in arrayOfNulls() reified #KT-5651 Fixed 2014-11-13 20:56:10 +03: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 6ddc063a76 Regenerate test data on enums
Now they have final equals, hashCode and compareTo
2014-10-17 21:27:24 +04:00
Michael Bogdanov 08e02f4176 Moving platformStatic annotation to kotlin.platform package 2014-09-10 17:35:59 +04:00
Alexander Udalov b52f337f7f Drop enum class object hack
Place valueOf() and values() into the static scope of the corresponding enum
class

 #KT-5580 Fixed
 #KT-2410 Fixed
2014-09-09 20:42:37 +04:00
Michael Bogdanov 7bbedd9685 Added platformStatic annotation 2014-09-09 16:26:15 +04:00
Alexander Udalov 9908d797e0 Minor, fix LoadBuiltinsTest test data 2014-07-26 00:27:31 +04:00
Alexander Udalov 133b2918e1 Drop a hack which allowed to make Unit an object 2014-07-25 21:45:15 +04:00
Alexander Udalov fb958897a9 Introduce kotlin.Cloneable
- Cloneable is a trait with a single protected member 'clone', which is mapped
  to java.lang.Cloneable on JVM
- 'clone' is non-abstract to be able to call 'super.clone()' in the
  implementations. Also if you need your class to be Cloneable, most of the
  time inheriting from Cloneable and calling 'super.clone()' will work
- hack 'super.clone()' in JVM intrinsics and TImpl delegation generation
- make arrays Cloneable, handle 'clone()' calls in the intrinsic

 #KT-4890 Fixed
2014-07-25 21:19:39 +04:00
Zalim Bashorov c85ec97589 Minor: revert dc68d78 (Minor: revert changes in StackValue and fix tes data. another fixes) 2014-07-25 17:16:40 +04:00
Zalim Bashorov dc68d78d9d Minor: revert changes in StackValue and fix tes data.
(this commit should be reverted after make Unit object)
2014-07-11 20:28:57 +04:00
Zalim Bashorov c51b653b31 Minor: fixed tests. 2014-07-10 17:25:42 +04:00
Michael Bogdanov ce71c5abde Test update for new ONLY_LOCAL_RETURN diagnostic 2014-07-07 10:51:46 +04:00
Alexander Udalov 751f062f23 Add *Range.isEmpty(), *Progression.isEmpty() 2014-06-18 20:22:24 +04:00
Alexander Udalov c7a7f31e82 Introduce module 'reflection', move KFunctionN to it
Metadata for KFunction classes is now longer serialized along with built-in
classes. This effectively means that it's no longer possible to find KFunction
classes via dependency on built-ins. There should be a kotlin-runtime library
in the specified classpath for reflection types to be resolvable.

A lot of tests were moved and changed, because tests on callable references
require stdlib in classpath from now on
2014-05-19 19:50:57 +04:00
Alexander Udalov 6e23af2ba3 Split Library.kt into several files
For better readbility and discoverability. Also rename String.compareTo
parameter to "other", since that is the name of parameter of other compareTo's
2014-03-02 19:55:27 +04:00
Alexander Udalov f2b4c7fa3e Fix LoadBuiltinsTest after renaming "jet" to "kotlin" 2014-03-02 19:55:25 +04:00
Alexander Udalov 11cc7f46f4 Remove "Iterator.iterator()" intrinsic, add stdlib function 2014-03-02 19:55:24 +04:00
Alexander Udalov b68e47f705 Move JVM-specific annotations out of built-ins
Move 'volatile' and 'synchronized' to package 'kotlin' in stdlib. Also delete
'atomic', since its support was never implemented
2014-03-02 19:54:55 +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
Alexander Udalov 8c97d9ebb3 Fix rangeTo between Float and Long
Float.rangeTo(Long) and Long.rangeTo(Float) now both return FloatRange for
consistency with other binary operations between floats and longs which, in
turn, return float to be consistent with Java
2014-02-19 17:46:18 +04:00
Alexander Udalov 3e33473c1a Don't check equals, hashCode, toString in LoadBuiltinsTest
Otherwise there'll be too many fake overrides when these methods will appear in
Any
2014-02-19 17:44:19 +04:00
Alexander Udalov e28819b42e Revert "Using default renderer in LoadBuiltinsTest."
This reverts commit 1d21ebf882.

Conflicts:
	compiler/testData/builtin-classes.txt
	core/descriptors/src/org/jetbrains/jet/renderer/DescriptorRendererImpl.java

Reverting a part of this (related to the field 'prettyFunctionTypes') because
will need to add a test that deserialized built-ins (obtained by
KotlinBuiltIns.getInstance()) are consistent with lazy resolved built-ins. This
test would break because while DescriptorRenderer renders pretty function types
it compares descriptors to the ones from KotlinBuiltIns, but in case of lazy
resolve descriptors created for built-ins would be different from
KotlinBuiltIns, so renderer wouldn't correctly render a function type
2014-01-31 16:46:18 +04:00
Alexander Udalov 1538191c66 Fix variance in Progression and Range 2014-01-31 16:46:17 +04:00
Alexander Udalov 013d226b50 Update test data after introduction of compilable built-ins
'next()' in primitive iterators is now final, as it always was in module
'runtime' before
2014-01-27 18:33:49 +04:00
Evgeny Gerashchenko 513be47544 KT-4349 Make jet.Boolean implement Comparable
#KT-4349
2013-12-25 21:07:55 +04:00
Natalia Ukhorskaya 4329c42e3f Make unary minus and unary plus return int for byte and short 2013-12-23 13:46:00 +04:00
Evgeny Gerashchenko 1d21ebf882 Using default renderer in LoadBuiltinsTest. 2013-12-19 21:48:39 +04:00
Evgeny Gerashchenko 17cf488cc6 Removed redundant tests for loading builtins. 2013-12-17 20:29:00 +04:00
Evgeny Gerashchenko 7abe6a5b4a Big refactoring. Migrating to package views and fragments. 2013-12-17 19:18:33 +04:00
Sergey Mashkov b62e5e3ef5 Add [tailRecursive] annotation to built-ins 2013-12-05 21:41:02 +04:00
Alexander Udalov 1760c3c90c Fix test data for Char members 2013-12-04 18:35:53 +04:00
Alexander Udalov 1c3383c811 Unextend Char from Number
This is impossible to achieve on JVM, where java/lang/Character does not extend
java/lang/Number
2013-12-04 15:57:53 +04:00