Commit Graph

889 Commits

Author SHA1 Message Date
Alexander Udalov 7cc1ed5cb1 Add regression test for KT-3413 2013-03-18 14:52:29 +04:00
Alexander Udalov 242b97febf Fix mapGetterSignature/mapSetterSignature
In case of TRAIT_IMPL the incorrect this was written. Reuse the code from the
common mapSignature

 #KT-3413 Fixed
2013-03-15 22:03:39 +04:00
Alexander Udalov a9776016a9 Resolve static methods of enum in front-end
Up to this point, front-end did not suspect that there could be classes which
have both a class object and a package for static members. Since this became
possible for enums loaded from Java binaries (enum entries and valueOf()/
values() are placed into the class object, and every other static member into
the package), we adjust the corresponding scope to also include members from
the corresponding package

 #KT-2990 Fixed
2013-03-15 16:00:57 +04:00
Alexander Udalov 68844131b0 Fix broken isEnumClassObject methods
Out of three methods, two were incorrect
2013-03-15 16:00:55 +04:00
Evgeny Gerashchenko be30716076 Test for KT-2017 Cannot sort list with no comparator
#KT-2017 obsolete
2013-03-14 20:49:41 +04:00
Alexander Udalov e8088ec6a7 Write correct InnerClasses attribute to class files
InnerClasses should contain entries for every inner and every outer class,
according to the JVMS

 #KT-3390 Fixed
2013-03-12 14:57:14 +04:00
Natalia.Ukhorskaya 02c8989b2f Top level functions inside module should be invoked using package$src class 2013-03-06 16:22:52 +04:00
Evgeny Gerashchenko 0f83c8297e Added corner case test for int range iteration. 2013-03-05 14:58:43 +04:00
Mikhael Bogdanov b3ec87f956 ClassObject instance field refactoring 2013-03-04 16:42:55 +04:00
Mikhael Bogdanov 6e1e495397 KT-3374 Wrong this@method receiver 2013-02-28 15:22:35 +04:00
Mikhael Bogdanov 029b2d9770 Test fixes for 'New diagnostic error for ambiguous object expression type' 2013-02-19 17:56:56 +04:00
Mikhael Bogdanov 1b2da6b558 Write proper enclosingMethod/enclosingClass information to bytecode 2013-02-19 17:56:55 +04:00
Alexey Sedunov 1f8d42ab49 Fix nullability check (in case of explicitly nullable types constructed from ype variables) 2013-02-13 18:23:37 +04:00
Evgeny Gerashchenko b9e5704057 Updated test data and stdlib sources. 2013-02-13 18:08:37 +04:00
Evgeny Gerashchenko 882c2cb28d Added tests with NaN ends to codegen tests. 2013-02-13 18:08:36 +04:00
Evgeny Gerashchenko 5a4ae00970 Added range iteration test with non-literal ranges. 2013-02-13 18:08:33 +04:00
Mikhael Bogdanov c61c8d7fa0 Compilation Exception - remove duplicated this on stack
#KT-3114 Fixed
2013-02-11 15:19:49 +04:00
Alexander Udalov 620143ae5b Add test on bytecode text
Test data should be a Kotlin source file with zero or more comments e.g. of
the form: '// 1 INVOKEVIRTUAL'. The test then checks that the generated
bytecode for this file contains exactly one occurrence of the string
'INVOKEVIRTUAL'
2013-02-11 02:01:43 +04:00
Alexander Udalov b485c7ae26 Switch class loading logic in blackBoxWithJava tests
BoxWithJava tests now by default are loaded with the classloader which has
test's classpath in itself, as in the former ClassPathInTheSameClassLoaderTest
2013-02-11 02:01:42 +04:00
Alexander Udalov a61b3ec461 Move multi-file codegen testData to boxMultiFile/
There'll be an auto-generated test over this directory
2013-02-11 02:01:42 +04:00
Alexander Udalov 544aad390d Delete StdlibTest and StdlibTestForever
Move remaining tests to AnnotationGenTest (where they did belong to in the
first place)
2013-02-11 02:01:42 +04:00
Alexander Udalov 90d255e7da Simplify tests on not-null assertions
No need to call blackBoxFile() on a useless test data file. Also creating
environment logic is simplified
2013-02-11 02:01:41 +04:00
Alexander Udalov 9df3c22097 Kill blackBoxFile()
If your test is supposed to use blackBoxFile(), maybe it should be placed into
box/boxWithStdlib directory
2013-02-11 02:01:41 +04:00
Alexander Udalov 31231fe18b Move JdkAnnotationsTest to boxWithStdlib 2013-02-11 02:01:41 +04:00
Alexander Udalov f994c9924f Move FullJdk tests to boxWithStdlib 2013-02-11 02:01:41 +04:00
Alexander Udalov 714708eac7 Delete generated test cases, move testData to boxWithStdlib 2013-02-11 02:01:40 +04:00
Alexander Udalov b311255d96 Extract junit testcase, delete unneeded code 2013-02-11 02:01:40 +04:00
Alexander Udalov 8a605b3884 Codegen tests: move stdlib tests to boxWithStdlib 2013-02-11 02:01:40 +04:00
Alexander Udalov 83b93071d3 Fix over-optimized comparison with null 2013-02-11 02:01:39 +04:00
Alexander Udalov dfc45cc21e Fix Android codegen tests 2013-02-07 22:42:17 +04:00
max-kammerer 843991083d For namespaces with multiple files keep 'Compiled from' information empty 2013-02-07 18:00:53 +04:00
Natalia.Ukhorskaya 11273f3035 Implement package protected visibility 2013-02-06 21:54:19 +04:00
Natalia.Ukhorskaya 88e3b9e190 Add codegen tests for package visibility 2013-02-06 21:54:18 +04:00
Alexander Udalov 64bc79aaac Fix safe calls codegen for nullable generic 2013-02-06 17:54:30 +04:00
Alexander Udalov 433660b2ce Fix codegen of !! for nullable generics 2013-02-06 17:54:29 +04:00
Alexander Udalov 75f09b7527 Fix codegen of as-casts for nullable generics 2013-02-06 17:54:28 +04:00
Alexander Udalov 70f67c7993 Fix elvis expression in case of nullable generic 2013-02-06 17:54:27 +04:00
Alexander Udalov 8697adb28a Fix generic data class hashCode for null
Null may come from everywhere, so we always check for it (when the property's
type is not primitive)
2013-02-06 17:54:26 +04:00
Alexander Udalov 1f4dd8cd33 Add CodegenUtil.isNullableType(), fix assertions
JetType.isNullable() is not accurate when the type denotes a type parameter:
a parameter can be not null (isNullable=false), but its upper bound can be
nullable (<T: Any?>), so null may appear in the value of such type. Therefore
it's preferred to use a special check (isNullableType()) in codegen from now on

Do not generate assertion for parameters of not-null types which have a
nullable upper bound + the same with Java method calls

Also fix Intrinsics class internal name in tests

 #KT-3313 Fixed
2013-02-05 21:52:29 +04:00
Alexander Udalov 8eb6047972 Fix assertions generation for substituted members 2013-02-05 16:26:56 +04:00
Alexander Udalov 4ca522bf0e Fix codegen of do-while condition
The condition of a do-while loop can use variables declared in the loop
(variables can only be declared inside a block). Previously this behaviour
caused crash because after the block was generated, all variables declared
inside that block were gone from myFrameMap

 #KT-3280 Fixed
2013-02-04 15:30:38 +04:00
Alexander Udalov 2e64aac788 Add regression test for KT-3132
#KT-3132 Obsolete
2013-01-31 20:59:16 +04:00
Alexander Udalov 1d8e7626a1 Regenerate ranges testData 2013-01-31 20:58:22 +04:00
Andrey Breslav bbde38a6dc KT-1360 Vararg bug in front-end 2013-01-31 18:54:37 +04:00
Andrey Breslav 2d2c44ca9d KT-2106 Mixed named and positional arguments should be allowed
#KT-2106 Fixed
2013-01-31 15:43:14 +04:00
Evgeny Gerashchenko 57e985b7f1 Generated codegen tests for ranges. 2013-01-30 19:24:15 +04:00
Evgeny Gerashchenko 21c37951d6 Removed old range test which were spread all over the place. 2013-01-30 19:23:51 +04:00
Evgeny Gerashchenko b2e74b1473 Adapted code to new structure of ranges. 2013-01-29 22:55:06 +04:00
Evgeny Gerashchenko 9fa3e47b65 Added start and end property to generic range. 2013-01-29 22:55:05 +04:00
Evgeny Gerashchenko 0e0c048074 New structure of range classes. 2013-01-29 22:55:05 +04:00