Commit Graph

45134 Commits

Author SHA1 Message Date
Mikhael Bogdanov cc7bd80099 Enable multidex in android box tests 2018-02-16 14:22:04 +01:00
Mikhael Bogdanov 31c63dea50 Add jvm target 10 tests on jdk 10 2018-02-16 14:22:04 +01:00
Mikaël Peltier 2de0b2a9ef Cleaning into RedundantGotoMethodTransformer
- Use val when it is possible
- Use filterIsIstance
- Replace takeif + ?.let by an if instruction
2018-02-16 15:15:52 +03:00
Mikaël Peltier 9fb0f59813 KT-17110 Rewrite branches targeting other branches
- Rewrite branches targeting other branches to target directly the
final destination to avoid runtime performance penalties.

Fix of https://youtrack.jetbrains.com/issue/KT-17110
2018-02-16 15:15:52 +03:00
Mikhael Bogdanov c9624ce0f9 Update gradle to 4.5.1 2018-02-16 12:31:18 +01:00
Alexey Sedunov 994d6ab4f9 Temporarily revert "UAST: Do not create UElements in non-JVM modules" 2018-02-16 14:05:16 +03:00
Nikolay Krasko ae0bd9cc8c Additional diagnostic for incorrect stub type in Kotlin file (EA-111617) 2018-02-16 13:29:54 +03:00
Nikolay Krasko 866129984e Expression can be parenthesized on replace with if (KT-22874, EA-91186)
#KT-22874 Fixed
2018-02-16 13:29:53 +03:00
Nikolay Krasko 67183ad3b0 Fix class cast exception in KotlinFunctionParameterInfoHandler (EA-91186) 2018-02-16 13:29:50 +03:00
Nikolay Krasko d868c01671 Disable outdate runtime check for developers builds
We can't update them properly anyway.
2018-02-16 13:29:49 +03:00
Nikolay Krasko 86dfc1ae2c Add internal action for reactivating post-open project activity 2018-02-16 13:29:48 +03:00
Nikolay Krasko 8a655b70e0 Fix isModified check in Kotlin compiler tab (KT-22851)
outputPostfix and outputPrefix is saved with nullize in apply, but
modification check was without it.

 #KT-22851 Fixed
2018-02-16 13:29:47 +03:00
Mikhail Glukhikh 6c328e7845 Fix IdeModuleInfoTests (related to KT-21771) 2018-02-16 13:15:02 +03:00
Alexey Sedunov d5df8c60fc UAST: Do not create UElements in non-JVM modules 2018-02-15 20:37:44 +03:00
Alexander Udalov a2835fe0d3 Do not report old runtime warnings for unstable API version
These warnings are technically correct but are too noisy and have little
value in case a user explicitly specifies unstable API version: it's
unlikely that seeing these warnings, the user will choose to rollback to
an earlier API version, since new API is probably one of the reasons
that user specified that unstable version to begin with.

So, in "kotlinc -language-version 1.3 -api-version 1.3 -cp
kotlin-stdlib-1.2.jar", we will no longer report a warning that the
attached stdlib has a version older than explicit API version (so long
as 1.3 remains unstable).

Note that we _could_ have reported these warnings in "kotlinc
-language-version 1.3 -cp kotlin-stdlib-1.2.jar", because in this case
the user might've not even be concerned with the new API in 1.3 and was
only looking for new language features. However, we still think that
it'd be unnecessary and one opt-in to the experimental world (with
LV=1.3 in this case) is enough

 #KT-22777 Fixed
2018-02-15 17:30:50 +01:00
Alexander Udalov 007248620c Disable API version inference when "-language-version" is specified
API version inference happens in
JvmRuntimeVersionsConsistencyChecker.checkCompilerClasspathConsistency
only in the case when API version is specified explicitly (with
"-api-version ..."). However, if the user specifies "-language-version
1.3", what's likely meant is "-language-version 1.3 -api-version 1.3",
and it would be unwise to infer API version to 1.2 (which is the version
of the attached stdlib) in this case.

Therefore, API version is now considered to be specified explicitly if
_either_ -language-version or -api-version is specified on the command
line

 #KT-22777 In Progress
2018-02-15 17:30:42 +01:00
Alexander Udalov 3f6aeb6dca Refactor API version inference/checking code
The behavior is not changed in this commit
2018-02-15 17:30:01 +01:00
Alexander Udalov 749773aa36 Remove -Xskip-runtime-version-check from error messages 2018-02-15 17:28:47 +01:00
Alexander Podkhalyuzin d940546a10 Added optional dependency to Kotlin/Native Java plugin 2018-02-15 18:58:53 +03:00
Alexander Udalov 213df24644 Fix Java9ModulesIntegrationTest.testAutomaticModuleNames on Windows
Do not use '*' in the file name since it's forbidden on Windows
2018-02-15 18:48:08 +03:00
Mikhail Glukhikh 427d7fd1cc Fix compilation 2018-02-15 18:16:58 +03:00
Alexander Podkhalyuzin 898b31cb83 Merge pull request #1516 from JetBrains/always_fallback_to_hardcoded_plugin_id
Use hardcoded plugin ID when loaded in the main classloader
2018-02-15 17:03:29 +03:00
Dmitry Petrov 8bfbbe456f Use NoScopeRecordCliBindingTrace for codegen tests 2018-02-15 16:40:26 +03:00
Dmitry Petrov 10916b2046 Minor: reformat code 2018-02-15 16:40:13 +03:00
Alexander Udalov f8424624ca Minor, check compiler output in ExperimentalIntegrationTest 2018-02-15 13:14:38 +01:00
Alexander Udalov 4a370e9dba Don't break the "API <= LV" rule in compiler tests
Stability of the language version is used for example to determine
whether the PRE_RELEASE_CLASS diagnostic should be reported. Now that
there are pre-release classes in the standard library (Experimental et
al.), we'd like to avoid this error on their usages in diagnostic tests
which are using the "!API_VERSION: 1.3" directive
2018-02-15 13:14:37 +01:00
Alexander Udalov 31e762c679 Move 1.3-specific part of stdlib to another source set 2018-02-15 13:14:37 +01:00
Mikaël Peltier ef6b6cd261 Fix NPE into isArraySizeAccess 2018-02-15 12:41:33 +03:00
Mikaël Peltier 3c2f137fd5 Exclude tests from JS backend due to a bug into it 2018-02-15 12:41:33 +03:00
Mikaël Peltier be07a348ea Reformat tests 2018-02-15 12:41:33 +03:00
Mikaël Peltier 8676ca34d7 KT-22334 Specialized loops using range such as integer..array.size-1
- Into PrimitiveNumberRangeLiteralRangeValue modifies how bounded
value are created by checking if the high bound range can be modified
to be exclusive instead of inclusive such as the generated code will
be optimized.
- Add black box tests checking that the specialization does not fail
on any kind of arrays.
- Add a bytecode test checking that the code is correctly optimized.

Fix of https://youtrack.jetbrains.com/issue/KT-22334
2018-02-15 12:41:33 +03:00
Ilya Gorbunov 8c8caa4707 kotlin-test: change actual package name for test annotation typealiases
to avoid potential split package situation
2018-02-14 23:50:30 +03:00
Ilya Gorbunov dfa6fc7d48 IDEA settings: add pattern for upsource review links 2018-02-14 19:29:41 +03:00
Vyacheslav Gerasimov 6959f6af75 Exclude lib subdirs from inlellij module
When lib/rt is added to test runtime some tests break
2018-02-14 18:42:10 +03:00
Sergey Igushkin 14e9930f94 Apply shading/relocation to the subplugin example 2018-02-14 17:43:05 +03:00
Alexey Tsvetkov 1dadf84c40 Check Java interop in Maven IC tests 2018-02-14 16:31:30 +03:00
Alexey Tsvetkov 07c94a5586 Check output in Maven IC tests 2018-02-14 16:31:30 +03:00
Alexey Tsvetkov 42c433f950 Avoid removing target/classes dir during IC in Maven
#KT-21581 fixed
2018-02-14 16:31:30 +03:00
Sergey Igushkin fa3ca0cddb Merge pull request #1517 from JetBrains/igushkin/gradle-it-readme
Update Readme.md for Gradle plugin IT
2018-02-14 16:28:04 +03:00
Sergey Igushkin ad30e898c2 Create Readme.md 2018-02-14 16:27:11 +03:00
Sergey Igushkin f9191ff210 Update ReadMe.md 2018-02-14 16:23:08 +03:00
Alexey Tsvetkov 67a5cab343 Fix IC test data
Test data was broken starting from 0954d1ab1b
2018-02-14 16:09:07 +03:00
Mikhail Glukhikh 3f500a1655 Add "expectedBy" to module descriptor and use it in checker
Now ExpectActualDeclarationChecker in IDE context
uses common module descriptors for relevant checks.
Compiler still uses own module instead (see comment in checker)
So #KT-21771 Fixed
2018-02-14 15:09:14 +03:00
Mikhail Glukhikh 78136fbb07 IDE facet refactoring, ModuleInfo.expectedBy introduced.
Part of facet classes was extracted to idea-analysis module
Related to KT-21771
2018-02-14 15:09:14 +03:00
Mikhail Zarechenskiy 694f5690f9 [NI] Improve diagnostic about unresolved receiver for many candidates 2018-02-14 14:58:05 +03:00
Mikhail Zarechenskiy 3afd4a2f4a [NI] Record all diagnostics from subcalls resolution results 2018-02-14 14:58:04 +03:00
Mikhail Zarechenskiy 6a7a07bf9d [NI] Don't forget to report about unresolved callable reference 2018-02-14 14:58:04 +03:00
Sergey Igushkin a3aefac111 (minor) Fix testAndroidKaptChangingDependencies 2018-02-14 14:53:14 +03:00
Alexander Udalov ecc441a642 Minor, remove obsolete JDK 6-related workaround 2018-02-14 12:50:16 +01:00
Alexander Udalov 60a551404a Refine modality of fake overrides inherited from abstract expected members
In an open expected class inheriting an expected interface, abstract
members are now inherited as _open_ fake overrides, not final. Final was
technically safer but also stricter and thus could be unexpected by the
user. In a final class, abstract members are still inherited as _final_
fake overrides. So, the general rule is now the following: the modality
of an expected fake override, which overrides only abstract members, in
a non-abstract class is equal to the modality of that class

 #KT-22031 Fixed
2018-02-14 12:45:45 +01:00