Commit Graph

3048 Commits

Author SHA1 Message Date
Natalia Ukhorskaya 88a2612348 Regenerate tests 2014-09-17 14:21:34 +04:00
Natalia Ukhorskaya 655682ac97 Move regression tests from stdlib to compiler
#KT-5770 FIxed
2014-09-17 13:59:52 +04:00
Michael Bogdanov a735d67e86 Check noinline annotation on non-local return processing 2014-09-16 15:33:14 +04:00
Michael Bogdanov b763aa9995 Added platform static checker with provider implementation 2014-09-16 14:38:15 +04:00
Alexander Udalov 1905401273 Move ClassId to module descriptors, closer to other names 2014-09-16 11:36:39 +04:00
Alexander Udalov 556e313141 Minor, improve multi-module java analysis test
- don't check supertypes for every callable in a class
- don't check methods from Any
- check that all descriptors were correctly resolved (otherwise the test
  failure error message was very cryptic)
2014-09-15 19:30:53 +04:00
Alexander Udalov 73a92c6aa9 Remove JavaClass.getAllMethods()/getAllFields()
Their behavior is different in PSI and reflection (two things that this
interface is supposed to unify), so there's no point in making it interface
methods, rather we should just walk supertype hierarchy manually

Also make JavaClassImpl.getSupertypes() invoke PsiClass.getSuperTypes(),
because it also contains java.lang.Object for interfaces, which makes
equals/hashCode/toString appear in interfaces' getAllMethods() as well
2014-09-15 19:30:53 +04:00
Alexander Udalov f64e633a7e Minor, add NotNull annotations to test sources 2014-09-15 19:30:52 +04:00
Alexander Udalov 7595e32bb6 Use ClassId instead of JvmClassName in KotlinJvmBinaryClass
ClassId contains exact information about origin of the class (e.g. if '$' in
the class name denotes nested classes separator or just a character in the
name)
2014-09-15 19:30:51 +04:00
Alexander Udalov 422e922c36 Make JavaClassFinder accept ClassId rather than FqName
ClassId has more information about the name which will be very useful when
implementing JavaClassFinder in reflection
2014-09-15 19:30:50 +04:00
Alexander Udalov ec02382976 Assert that reference annotation argument is always an enum value
Rename JavaReferenceAnnotationArgument on that occasion to
JavaEnumValueAnnotationArgument. Also add a test on a nested enum annotation
argument
2014-09-15 19:30:49 +04:00
Andrey Breslav f1cf446e10 KT-5773 Smart cast doesn't work with Nothing on the rhs of "?:"
#KT-5773 FIxed
2014-09-15 18:24:13 +04:00
Alexander Udalov e0ee890486 Move properties of enum class object to the enum class
Similar to how it's done for usual classes
2014-09-11 17:56:43 +04:00
Alexander Udalov 81004889eb Fix initialization of object's INSTANCE$ field
Call object's constructor in <clinit> and ignore the result, but in the first
line of <init> save the current "this" to INSTANCE$

 #KT-4516 Fixed
 #KT-4543 Fixed
 #KT-5291 Fixed
 #KT-5523 Fixed
 #KT-5582 Fixed
2014-09-11 17:56:43 +04:00
Nikolay Krasko 32c00a4623 Return tree structure in test view result for running single test 2014-09-11 17:45:26 +04:00
Nikolay Krasko 10fbd4a269 Test that tests are executed only once in "All Tests" 2014-09-11 15:44:59 +04:00
Nikolay Krasko 80616a1fcb Drop all inners classes if sorting is needed 2014-09-11 15:44:58 +04:00
Nikolay Krasko 65d358a066 Don't generate component function in lazy resolve for parameter if it has no val/var 2014-09-11 12:52:56 +04:00
Nikolay Krasko caee19cdc7 Generate copy() in data class even if constructor is empty or not present 2014-09-11 12:52:55 +04:00
Zalim Bashorov 6d0bcf8b32 Frontend: added the support file annotations to TopDownAnalyzer. 2014-09-10 22:39:12 +04:00
Zalim Bashorov 486b6be32c Minor in Parser: "attribute" -> "annotation" 2014-09-10 22:39:11 +04:00
Zalim Bashorov d71c3d6166 Minor in Parser: moved some annotation tests. 2014-09-10 22:39:11 +04:00
Zalim Bashorov 3c60d0de93 Parser: added the support file annotations. 2014-09-10 22:39:11 +04:00
Andrey Breslav b8b0316d97 Reporting ACCIDENTAL_OVERRIDE on jvm signatures that have no descriptors
(marking them SYNTHETIC)
2014-09-10 17:35:54 +04:00
Nikolay Krasko d32221ff4a Add sorted and filter to custom test runner 2014-09-09 23:35:16 +04:00
Alexander Udalov 55e5241158 Regenerate tests 2014-09-09 20:42:39 +04:00
Alexander Udalov 5b1993f62a Resolve "values" and "valueOf" in enum class object
Import enum class's static scope into its class object's member scope
2014-09-09 20:42:38 +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
Alexander Udalov bb54825fac Fix incorrect test data for wrong KotlinSignature CLI test
Classes from the root package cannot be referenced from a non-root package
2014-09-09 20:42:36 +04:00
Alexander Udalov bcfb5f3b09 Rewrite Java resolve to use static class scope instead of synthesized packages
#KT-4149 Fixed
 #KT-4839 Fixed
2014-09-09 20:42:36 +04:00
Alexander Udalov 7ad88f7799 Minor, add test for obsolete issue
#KT-4021 Obsolete
2014-09-09 20:42:35 +04:00
Alexander Udalov d86903ccd4 Minor, add codegen test on extension to nested class 2014-09-09 20:42:35 +04:00
Michael Bogdanov e26d635633 Initial implementation of platformStatic 2014-09-09 16:28:28 +04:00
Nikolay Krasko 041d009b9a Regenerate tests 2014-09-09 14:28:24 +04:00
Nikolay Krasko c6905b971c New runner for auto-generated test
- Run classes with inners
- Remove suite() methods in generated and prevent double test execution
2014-09-09 14:28:22 +04:00
Andrey Breslav 32c8d3a96d Tests regenerated 2014-09-08 19:57:41 +04:00
Andrey Breslav cb07c65b7d @TestDataPath and @TestDataFile annotation added to facilitate navigation to test data 2014-09-08 19:57:40 +04:00
Svetlana Isakova 976d5ab030 Pseudocode: don't write full label name when jump on it 2014-09-07 01:04:00 +04:00
Svetlana Isakova 067ac5c94a Fixed one part of 'Resolution error of this type shouldn't occur for...'
Result for "IF<T>(T, T)" can be "hasUnknownParameters"
if both arguments have types 'uninferred type parameter' (incomplete resolve case),
no constraints are added to the system.
2014-09-07 01:03:58 +04:00
Svetlana Isakova 61dc110cc7 Report 'break or continue outside a loop'
for break/continue outside a loop body (e.g. in loop condition)

 #KT-5724 Fixed
2014-09-07 01:03:57 +04:00
Svetlana Isakova 0b4f313b6d Jump on 'continue' to condition entry points for all loops 2014-09-05 18:31:53 +04:00
Michael Nedzelsky 25a0854dbd fix KT-5645: 'continue' inside 'do...while' statement works as goto to the beginning of the loop (not checking loop condition)
#KT-5645 Fixed
2014-09-05 18:31:53 +04:00
Alexey Sedunov f11621615b Pseudocode: Do not generate VALUE_CONSUMER if property delegate has no value (EA-59276) 2014-09-05 17:39:54 +04:00
Nikolay Krasko 053201f30f Don't store test data in field 2014-09-02 14:41:41 +04:00
Svetlana Isakova bbeb44e6ee Fixed NPE in ArgumentMatchImpl.getStatus
Check value arguments if there is wrong number of type arguments
2014-09-01 12:32:52 +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 6c63492355 KT-5308 Wrong ExplicitReceiverKind when access to IntRange.EMPTY
#KT-5308 Fixed
2014-09-01 12:32:49 +04:00
Svetlana Isakova 8289f13016 Introduced QualifierReceiver instead of PackageType 2014-09-01 12:32:49 +04:00