Commit Graph

32203 Commits

Author SHA1 Message Date
Alexander Udalov 3fa87fe4de Move get-protobuf later in update_dependencies
It invokes kotlinc, so should happen after the bootstrap compiler is downloaded
2016-06-17 17:23:19 +03:00
Mikhail Glukhikh 5ccbf47531 Elvis / if / when now infer error type in case of ErrorType + Nothing #KT-6665 Fixed
(cherry picked from commit 9a50a0b)
2016-06-17 16:43:24 +03:00
Mikhail Glukhikh 49fb9ff424 Sealed class hierarchies are now correctly processed in when (by checking possible smart casts to nested sealed classes) #KT-10648 Fixed
(cherry picked from commit 2eaaf9c)
2016-06-17 15:22:15 +03:00
Stanislav Erokhin 01430b4b99 Create hack for exception about "Empty intersection for types".
Hackaround for KT-11266, EA-79963, EA-72093,  EA-79976.
2016-06-17 01:39:44 +03:00
Nikolay Krasko 490ff621b6 Implement isInheritor method with utility method that has special behaviour for anonymous classes 2016-06-16 18:50:40 +03:00
Nikolay Krasko 784fd963cd Implement copy methods for anonymous and enum entry light classes 2016-06-16 18:50:39 +03:00
Nikolay Krasko 29b94f650c Make Kotlin light class more like PsiAnonymousClassImpl
Avoid delegating to cls delegate in more places
2016-06-16 18:50:39 +03:00
Nikolay Krasko 9359d0aab4 Compare anonymous classes with psi only to avoid counting qualified name 2016-06-16 18:50:38 +03:00
Alexander Udalov de986ed051 Do not skip synthesized members when generating bridges
The condition here is obsolete since SAM adapters can no longer be overridden:
they are now extensions in another scope

 #KT-12708 Fixed
2016-06-16 16:51:18 +03:00
Alexander Udalov af9883bccf Add test on accidental redeclaration of final members from java.lang.Enum
This is working because of the additional built-ins members added in 1.1
2016-06-16 16:51:18 +03:00
Alexander Udalov 79ecc9751b Report error on accidentally "overriding" wait/notify
Hard-code only Object members because diagnostics are reported for all other
classes out of the box in 1.1

 #KT-7174 Fixed
2016-06-16 16:51:18 +03:00
Alexander Udalov da332d1a27 Validate "-jvm-target" value in CLI, improve message 2016-06-16 16:51:18 +03:00
Alexander Udalov 02fd5371aa Update metadata version to 1.1.2 and bytecode version to 1.0.1
This is needed for the upcoming 1.1 EAP: it'll be easier to diagnose problems
arising from new language features and bytecode modifications
2016-06-16 16:51:18 +03:00
Alexander Udalov b4f81d4bb5 Use 'JVM_TARGET: 1.8' directive in codegen tests on 1.8 target 2016-06-16 16:51:18 +03:00
Mikhail Glukhikh ac03d98cb2 Inspection "can be primary constructor property" with relevant quick-fix #KT-8477 Fixed
(cherry picked from commit 2db7562)
2016-06-16 16:24:43 +03:00
Dmitry Petrov 9240c82934 KT-12733 'rangeTo' as a non-qualified call is not optimized in 'for'
Use ResolvedCall corresponding to 'for' loop range expression
for optimized "for-in-range-literal".
Cleanup.
2016-06-16 11:30:05 +03:00
Alexey Tsvetkov 5e21af7bdd Ensure direcory for class file stubs always exists
This fixes the warning "classpath entry does not exist"

    #KT-12352 fixed
2016-06-15 20:28:47 +03:00
Alexey Tsvetkov af10c13ef1 Set friend modules for android gradle test tasks
This fixes the following issues:
1. When product flavors were used, android unit tests could not refer
to internal symbols from main source set.
2. Android instrumentation tests could not refer
to internal symbols from main source set

    #KT-11166 fixed
2016-06-15 20:28:47 +03:00
Zalim Bashorov 0e428ca10c JPS: don't consider that production target of module "B" is depends on test target of module "A" when "B" depends on "A"
#KT-12595 Fixed
2016-06-15 15:01:32 +03:00
Dmitry Petrov a17b0dd1b5 KT-5075 Optimize array/collection indices usage in 'for' loop
Use specialized 'for' loop code generation strategy for loops over array indices and collection indices.
2016-06-15 14:01:18 +03:00
Mikhael Bogdanov 3a8591a729 Support 'jvm-target' in CLI 2016-06-15 13:43:29 +03:00
Mikhael Bogdanov 1c3ce93275 Generate same delagation structure as in jvm 6 target until new binary compatibility design
We need to make some decision about binary compatibility beetwen targets and semantics, so now old logic is used
2016-06-15 13:43:29 +03:00
Mikhael Bogdanov bb59638039 Support bridges in interfaces. Fix for KT-12416: Missed bridges in js backend
#KT-12416 Fixed
2016-06-15 13:43:28 +03:00
Mikhael Bogdanov c778af518b isJvm6Interface -> isAnnotationOrJvm6Interface 2016-06-15 13:43:28 +03:00
Mikhael Bogdanov 16159c483d Generate defaults methods on extending jvm6 interfaces 2016-06-15 13:43:27 +03:00
Mikhael Bogdanov 331341bd4d Don't generate delegates on overriding jvm8 interfaces 2016-06-15 13:43:27 +03:00
Michael Bogdanov 01aa89b1ea Generate delegation body for default interface methods, calculate proper abstractness for them 2016-06-15 13:43:26 +03:00
Mikhael Bogdanov fc8058848f Added classVersion to KotlinJvmBinaryClass 2016-06-15 13:43:26 +03:00
Michael Bogdanov 0ae2175a00 Add jvm8 target key, added jvm 8 option to bytecode tool window
IsJava8 renamed to isJvm8
2016-06-15 13:43:25 +03:00
Michael Bogdanov 96f892d60c Obtain class file version from GenerationState 2016-06-15 13:43:25 +03:00
Mikhael Bogdanov 77a386a266 Move java8 'compileKotlinAgainstKotlin' test under 'codegen/java8/compileKotlinAgainstKotlin/jvm6' folder 2016-06-15 13:43:24 +03:00
Mikhael Bogdanov 0169f10bf3 Support directives in write flag tests 2016-06-15 13:43:23 +03:00
Mikhael Bogdanov 5d5734841b Compile logic moved from AbstractBlackBoxCodegenTest to CodegenTestCase 2016-06-15 13:43:23 +03:00
Mikhael Bogdanov dce260563c Support directives in CompileKotlinAgainstKotlinTest 2016-06-15 13:43:22 +03:00
Alexander Udalov 99f4c7b6e7 Fix error in kapt on enum constructors with parameters
Do not skip writing the fictitious 'java/lang/Synthetic' annotation in KAPT
mode, because its absence makes ASM confuse indices of enum constructor
parameters (it cannot figure out that there are two additional parameters, name
and ordinal)

 #KT-12694 Fixed
2016-06-14 22:06:45 +03:00
Nikolay Krasko 5e7d007e75 Build output parser in separate module under 1.6 (KT-12159)
KotlinOutputParser accessed from gradle execution environment that can be started under Java 1.6.

 #KT-12159 Fixed
2016-06-14 20:58:07 +03:00
Alexander Udalov 7e38b93d80 Use protobuf with renamed packages, pack to IDEA plugin
Update GenerateProtoBuf.kt to also regexp-replace com.google.protobuf with
org.jetbrains.kotlin.protobuf in generated Java sources

 #KT-12581 Fixed
2016-06-14 14:17:22 +03:00
Alexander Udalov 952a85414b Rename packages in protobuf-java binaries and sources
#KT-12581 In Progress
2016-06-14 14:17:22 +03:00
Mikhail Glukhikh b1734920b6 Surround with null check : applicable also for TYPE_MISMATCH 2016-06-13 15:56:41 +03:00
Mikhail Glukhikh 10935ba9db Wrap with safe let call : minor refactoring 2016-06-13 15:42:04 +03:00
Mikhail Glukhikh 954952ae71 Surround with null check : apply for ITERATOR_ON_NULLABLE 2016-06-13 15:34:15 +03:00
Mikhail Glukhikh 7f771075fb Surround with null check : minor refactoring 2016-06-13 15:34:10 +03:00
Mikhail Glukhikh 230f73acc9 KT-11104 extra : name validator introduced for wrap with safe let call 2016-06-13 15:34:04 +03:00
Mikhail Glukhikh 3c49b5f342 KT-11104 extra : "wrap with safe let call" is now applicable for argument type mismatches 2016-06-13 15:33:59 +03:00
Mikhail Glukhikh 47c1106d5d Quick-fix "wrap with safe let call" introduced #KT-11104 Fixed 2016-06-13 15:33:53 +03:00
Mikhail Glukhikh f8b6ed226a Correct "Show type" on an invoked expression #KT-12671 Fixed 2016-06-13 15:33:48 +03:00
Mikhail Glukhikh 90342ea33b KT-11104 : quick fix "surround with null check" 2016-06-13 15:33:36 +03:00
Stanislav Erokhin 585dcbf1f3 KT-10717 Type inference for lambda with local return
#KT-10717 Fixed
2016-06-10 21:28:05 +03:00
Stanislav Erokhin da01e4a57c Add assertion for variable as operator call. 2016-06-10 21:28:04 +03:00
Stanislav Erokhin 03241419bd Minor. removed several tests with error calls. 2016-06-10 21:28:04 +03:00