5242985e2e
first cut of a little bit of code generation to make sure we mirror most of the java.util.Iterable<T> methods to Array<T>
James Strachan
2011-12-23 15:23:21 +00:00
db76e28c6d
added a little experimental spike of a text and markup based template library for internal DSLs for templating (which external DSLs like Jade / Razor / Velocity / Erb / JSP style) could layer on top of. Mails to follow shortly :)
James Strachan
2011-12-23 13:40:03 +00:00
f64c02c80a
test dsl example
Alex Tkachman
2011-12-22 17:24:50 +02:00
cf17beab8b
test dsl
Alex Tkachman
2011-12-22 14:58:25 +02:00
3a3af75c3d
Merge remote branch 'origin/master'
Alex Tkachman
2011-12-22 14:50:44 +02:00
e15ecc29da
Fix TC build. We don't have any bootsrap phase yet so Kotlin compiler is not available during build. Thus, any reference from Java to Kotlin class appears broken.
Maxim Shafirov
2011-12-22 16:32:33 +03:00
b0b14ecaa2
examples converted to new syntax
Alex Tkachman
2011-12-22 14:50:21 +02:00
6d41dee6f7
static typ[e info for Any & Any?
Alex Tkachman
2011-12-22 14:24:15 +02:00
2274ab48ab
added a useLines() methods on Reader to be able to use a line iterator (Iterator<String>) to process the file on a per line bases with the block in full control over how much of the file to process; though hit a couple of type inference issues
James Strachan
2011-12-22 09:36:18 +00:00
a7810c4396
another attempt at getting a flatMap test working, not quite figured out the generics yet :)
James Strachan
2011-12-22 09:09:14 +00:00
71b1aee908
added a little test case showing how we can iterate through lines in a file; also started adding helper methods to the standard kotlin Iterator; though probably need to rename the to* methods iterators, maybe to collect* as Stepan suggested. Could maybe use some extension function syntax making it easy to add helper methods consistently to Array, Iterator, Iterable, java.util.Iterator, java.util.Iterable at the same time, we're very inconsistent currently :)
James Strachan
2011-12-22 08:59:43 +00:00
060719e71b
added a test suite to run all the test cases (cheating, using java :)
James Strachan
2011-12-22 08:37:37 +00:00
a50067f6cf
ReadClassDataTest, working on generics
Stepan Koltsov
2011-12-21 22:28:23 +04:00
34e5f60496
Correct class object mapping in kotlin => java run
Maxim Shafirov
2011-12-21 09:04:56 +03:00
86bb01edcf
Correct inner/outer class relation in kotlin => java run
Maxim Shafirov
2011-12-21 09:04:08 +03:00
dd614569c0
Class objects are statics. I guess top level classes shall be static as well
Maxim Shafirov
2011-12-21 09:01:23 +03:00
85889a3762
Merge branch 'master' of git+ssh://git.labs.intellij.net/jet
James Strachan
2011-12-21 16:27:22 +00:00
894c84190a
migrated most of the test cases over to the new -> syntax for functions; still can't compile or run the tests yet though :(, needs more work...
James Strachan
2011-12-21 16:26:37 +00:00
9c5ff3fa7f
Refactoring: move main completion resolver out of Idea plugin.
Nikolay Krasko
2011-12-21 16:20:51 +04:00
aaf18bdd86
Merge branch 'master' of git+ssh://git.labs.intellij.net/jet
James Strachan
2011-12-21 10:10:12 +00:00
232d161e99
added a little helper method for processing a closeable object which then makes sure the resource is closed (like the try-with-resource extension in Java 7)
James Strachan
2011-12-21 10:09:55 +00:00
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--) } }
Andrey Breslav
2011-12-20 22:55:25 +04:00
914b5487b4
one more ext function test
Stepan Koltsov
2011-12-20 22:39:14 +04:00
c27885b74f
Stable classnames for object declarations whose type is exposed to java clients.
Maxim Shafirov
2011-12-20 10:28:47 +03:00
c9959a10f9
added a couple of helper methods to Map to be able look up in a Map with function to provide a default value
James Strachan
2011-12-20 18:06:58 +00:00
c3b41a5931
removed a TOD section
James Strachan
2011-12-20 17:56:31 +00:00
212160fa47
added Array<T>.to(collection) too, along with simpler more DRY one liners for arrayList(), linkedList() and hashSet() helper functions
James Strachan
2011-12-20 17:46:26 +00:00
b22945ddc1
Merge remote-tracking branch 'origin/master'
James Strachan
2011-12-20 17:28:53 +00:00
de4b0a4601
added Alex's to(collection: Collection<T>) helper method and simple 1 liners for toList / toLinkedList / toSet etc
James Strachan
2011-12-20 17:27:22 +00:00
6d19741394
Merge branch 'master' of git+ssh://git.labs.intellij.net/jet
James Strachan
2011-12-20 16:29:48 +00:00
ad9a83854e
added an optional project which just contains the stdlib and testlib (I was having issues trying to use everything together when trying to just work on stdlib/testlib)
James Strachan
2011-12-20 16:29:38 +00:00
fee6bed2d4
removed the create() methods; added linkedList<T>(varargs) helper method and made filter/flatMap/map all allow an optional argument for the kind of collection to filter/flatMap/map into. I've temporarily commented out Alex's implementation of Iterable.filter in Filters.kt as I was getting all kinds of compile error messages. Will discuss this on the list & how better to organise the functions into files
James Strachan
2011-12-20 16:28:18 +00:00
02111687d2
missing Trait test in ReadClassDataTest
Stepan Koltsov
2011-12-20 20:15:42 +04:00
c1bc5ceb99
enable class content serialization in ReadClassDataTest; add test for function params with upper bounds
Stepan Koltsov
2011-12-20 00:28:27 +04:00
c68f1e2409
work around javac bug, fix tests
Stepan Koltsov
2011-12-19 23:21:52 +04:00
23f4f80a52
Make a parameterized test
Nikolay Krasko
2011-12-19 21:20:49 +04:00
e19acf4922
LockPerf benchmark
Alex Tkachman
2011-12-19 15:57:48 +02:00
2ae3e9e6c6
Thread.kt
Alex Tkachman
2011-12-19 15:55:00 +02:00
1e471aa9c4
synchronized method
Alex Tkachman
2011-12-19 10:21:17 +02:00
9a7d947899
constant for Function0 added
Alex Tkachman
2011-12-19 09:26:04 +02:00
c6b69cad2c
test for obsolete KT-772
Alex Tkachman
2011-12-19 07:47:26 +02:00
7e93494e2f
renamed the sort() methods on Iterable which create a new List and sort that as "toSortedList()" instead which is more accurate.
James Strachan
2011-12-18 08:15:39 +00:00
b9c1b2cbfe
Merge branch 'master' of git+ssh://git.labs.intellij.net/jet
James Strachan
2011-12-18 07:18:30 +00:00
d122929b4b
first cut of the collection methods in the standard library in http://confluence.jetbrains.net/display/JET/Standard+Library along with a little testlib to test them. Still a few TODO things and tidy up (and am sure a few more methods could be very handy too) but its getting Kool :)
James Strachan
2011-12-18 07:17:38 +00:00
6039b0e721
test for unreproducable KT-779
Alex Tkachman
2011-12-17 19:02:37 +02:00
9f32a56a07
test for KT-511
Alex Tkachman
2011-12-17 12:40:01 +02:00