Commit Graph

44296 Commits

Author SHA1 Message Date
Nicolay Mitropolsky bc543b4cdf LightAnnotations: wrapping all PsiLiterals (not only Strings) 2018-02-19 15:08:02 +03:00
Alexey Sedunov 99fca79bdc UAST: Do not create UElements in non-JVM modules 2018-02-19 13:01:38 +03:00
Ilya Chernikov c9a0d7c624 Add missing reflect dependency to the gradle plugin
fixes #KT-22895
2018-02-19 10:20:17 +01:00
Denis Zharkov cef7205f14 Fix CCE caused by KotlinPackageSourcesMemberNamesIndex
FileContentImpl::getPsiFile is not-nullable and at the same time
it contains an explicit case of its fileType to LanguageFileType
that leads to the following exception in case when kt-file is marked as plain text:

java.lang.ClassCastException: com.intellij.openapi.file.exclude.EnforcedPlainTextFileTypeFactory$1 cannot be cast to com.intellij.openapi.fileTypes.LanguageFileType
	at com.intellij.util.indexing.FileContentImpl.createFileFromText(FileContentImpl.java:135)
	at com.intellij.util.indexing.FileContentImpl.getPsiFile(FileContentImpl.java:104)

 #EA-114338 Fixed
2018-02-19 10:31:46 +03:00
gzoritchak f790635b30 Add samples for joinTo
KT-20357
2018-02-18 20:12:05 +03:00
gzoritchak 40e3159463 Add samples for joinToString
KT-20357
2018-02-18 20:12:05 +03:00
Toshiaki Kameyama a36e8c86f1 KT-22428 Create member function from usage shouldn't present type parameters as options (#1509)
* KT-22428 Create member function from usage shouldn't present type parameters as options

* Reformat & cleanup
2018-02-17 14:09:44 +03:00
Alexey Belkov ea6582dd7d Minor: Fix typos and wording in NameResolution.adoc (#1523) 2018-02-17 13:51:08 +03:00
Alexander Udalov 96e33dabcf Fix JS stdlib file names in KotlinJpsBuildTest
Add "kotlin-experimental.js", "kotlin-experimental.meta.js" and refactor
surroundings
2018-02-16 17:09:34 +01:00
Mikhael Bogdanov d732f0e160 Never delete types from inline functions during inline transformations
#KT-19399 Fixed
2018-02-16 16:48:53 +01:00
Mikhael Bogdanov 729c866f47 Code clean 2018-02-16 16:48:52 +01:00
Nicolay Mitropolsky 47f3a0ce0a Revert "Light annotations made strictly non-physical (KT-22565)"
This reverts commit cf6e21d
2018-02-16 16:24:15 +03:00
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