Commit Graph

47645 Commits

Author SHA1 Message Date
Alexander Udalov 97faff246d Compile kotlinx-metadata-jvm with JVM target 1.6 instead of 1.8
#KT-25920 Fixed
2018-08-07 13:38:47 +02:00
Alexander Udalov 1582354077 Refactor CompileEnvironmentUtil.getKtFiles, move to KotlinCoreEnvironment
Do not call this method the second time in KotlinToJVMBytecodeCompiler
where all KtFile instances are already created; just get only those
files that are in the needed module, which can be determined solely by
the file path.

Also "kotlinize" getKtFiles and rename to createKtFiles
2018-08-07 13:38:30 +02:00
Alexander Udalov fe829add44 Minor, use TEMP_DIR/TESTDATA_DIR in CLI tests on xml build files
Otherwise the "outputDir" in these tests was treated as relative to the
project root, and starting from 63b4302cea, running these tests resulted
in the "whatever" directory being created in the project root
2018-08-07 13:38:30 +02:00
Alexander Udalov 19feacb96b Minor, expand TESTDATA_DIR with absolute path in CLI tests
To be able to use it correctly inside an xml build file where, if the
path is not absolute, it's treated as relative to the build file path
(which is TMP_DIR in several tests of the subsequent commit)
2018-08-07 13:38:30 +02:00
Alexander Udalov f9ed8e7aaf Minor, make org.jetbrains.kotlin.fileClasses.LOG private
To prevent it from being suggested in auto-import
2018-08-07 13:38:30 +02:00
Alexander Udalov 5da8ce844a Minor, move ContentRoot and KotlinSourceRoot to module 'cli'
Also move CONTENT_ROOTS from JVMConfigurationKeys to
CLIConfigurationKeys since it's used on all platforms, not just JVM
2018-08-07 13:38:30 +02:00
Alexander Udalov 14b8f4b52b Minor, change package of outputUtils.kt 2018-08-07 13:38:30 +02:00
Alexander Udalov 2d875a9cb4 Reformat module 'cli', fix warnings/inspections 2018-08-07 13:38:29 +02:00
Nikolay Krasko 21a7561271 Fix small gap for install message 2018-08-07 14:08:09 +03:00
Nikolay Krasko cb925375ed Not enough padding/white space for current version in update form (KT-25562)
#KT-25562 Fixed
2018-08-07 14:07:03 +03:00
Mikhael Bogdanov 5169cfba8f Use lazy symbol table in symbols 2018-08-07 12:42:05 +03:00
Nikolay Krasko 8e7d114850 Merge pull request #1795 from belovrv/patch-2
Delete the SlackIn badge
2018-08-07 12:28:00 +03:00
Nicolay Mitropolsky bbf2af1004 IdeaExtensionPoints.IDEA_COMPATIBLE_BUILD_NUMBER = "182.3040"
Otherwise Kotlin plugin is not loaded in some tests (`org.jetbrains.uast.test.kotlin.KotlinDetachedUastTest` for instance)
2018-08-07 12:26:30 +03:00
belovrv c17a9e10b5 Delete the SlackIn bage 2018-08-07 12:21:56 +03:00
Mikhail Zarechenskiy 1497c19dc9 Do not generate useless methods inside wrapper for inline class
Fix for test data (inlineFunctionInsideInlineClassesBox.kt) is needed
 to avoid check about "no inline functions".

 This check has two steps: first, names of inline functions from
 the metadata are loaded, then these names are checked that they are
 presented for physical methods in the classfile.

 Because now there are no physical methods in the classfile, we can't pass
 the second check, therefore this fix is needed.

 #KT-24872 Fixed
2018-08-07 12:15:46 +03:00
Yan Zhulanow fcbcabd3a2 Pill: Generate iml files more consistently with IDEA 2018-08-07 11:55:24 +03:00
Yan Zhulanow 014b812a31 Pill: Remove -SNAPSHOT suffixes for artifact JAR file names 2018-08-07 11:55:24 +03:00
Yan Zhulanow 42d00c144b Pill: Fix compilation, forcibly move the annotations-13 dependency to the end of classpath 2018-08-07 11:55:24 +03:00
Yan Zhulanow 769a0d7701 Pill: Add extra stdlib jars as dist libraries 2018-08-07 11:55:23 +03:00
Yan Zhulanow 54470fe2b7 Pill: Remove source dependencies to 'tests-common'
'tests-common' module does only have a test source set so the dependency is redundant.
2018-08-07 11:55:23 +03:00
Mikhail Glukhikh 09766ae2ae Reformat: AddNameToArgumentFix 2018-08-07 11:30:31 +03:00
Mikhail Glukhikh 06d339639f Fix "Add name to argument" (disable reformatting in quick-fix text)
Four relevant quick-fix tests should be fixed after it
2018-08-07 11:30:31 +03:00
Mikhail Glukhikh 28484f31e7 Fix "Remove @ from annotation argument" (make consistent PSI)
Three relevant quick-fix tests should be fixed after it
2018-08-07 11:30:31 +03:00
Dmitry Savvinov 9ad2edbe85 Bump stubs versions after 5ab79a111d 2018-08-07 10:22:46 +03:00
Dmitry Savvinov bd9254597d Fix testdata after switching idea version to 182
The source of testdata change is following commit from the
intellij-community repo:

d2bfe3d14bfa48af585f1faddc9a0c37dc05e724

It changes how Java-resolution resolves constructors:
- before, *any* PsiMethod without type reference was treated as
constructor
- now, PsiMethod without type reference is treated as constructor
only if their *names also match*

In particular, in this test, 'void () {}', surprisingly, doesn't have a
type reference ('void' is parsed as PsiErrorElement:Identifier
expected), its name is '<unnamed>', and its visibility is
'package-private' (!)

Therefore, previously we thought that 'Nameless' has package-private
constructor and were reporting INVISIBLE_MEMBER.
Now we don't see any constructor so we add default constructor, which has
public-visibility -> error is gone.

Note that this change affects behavior only when "red" code is already
present in the project (for "green" code, assumption "method without type
reference is a constructor" is indeed correct).
2018-08-07 10:18:25 +03:00
Dmitry Savvinov a71f09022c Fix testdata after switching idea version to 182
The source of changes is commit the following commit in
intelllij-community repo:

b2b723fa449b16bb1da8102a5efdc219977fefe0 speedup java class resolve a bit

Eseentially, it makes Java resolve (which Kotlin reuses) accept first
matching candidate from explicit named import, instead of continuing
search.

Hence, behavior in cases where several conflicting imports are present,
has changed: before, reference to such names were unresolved, now it's
candidate from first import (see also test UsageMixed.java in the
intellij-community repo).

Therefore, previously we saw such types as undeclared and reported
MISSING_DEPENDENCY_CLASS on them (assuming they are not present in
classpath); now we see such types as properly resolved, so error is
gone.

Because behavior has changed only in case there already was "red" code,
it is not a BC and we can just accept changes.
2018-08-07 10:18:25 +03:00
Alexey Sedunov ed5709afdb Misc: Fix compatibility issues with AS3.3C4 2018-08-06 21:39:17 +03:00
Vyacheslav Gerasimov 8231f5b259 Make handleElementRename overrides compatible with 183 platform 2018-08-06 20:24:46 +03:00
Mikhail Glukhikh d7317c58e9 Move "Add test library to classpath" to irrelevant action list
This prevents inconsistencies like "Add JUnit 5.0" / "Add JUnit 5.2"
Should fix one relevant test
2018-08-06 19:04:12 +03:00
Mikhail Glukhikh 21be8d118d Fix "ReplaceInfixOrOperatorCallFix" (make consistent PSI)
One relevant quick-fix test should be fixed after it
2018-08-06 19:04:11 +03:00
Mikhail Glukhikh 247bb912ba Fix refactoring test (bunch file -> original file) 2018-08-06 19:04:09 +03:00
Mikhail Glukhikh e15fc7da15 Fix two inspection tests (bunch file -> original file) 2018-08-06 19:04:07 +03:00
Mikhail Glukhikh 90245659ff Fix testOptionalParameterAndLambdaComplex (related to KT-24694) 2018-08-06 19:04:05 +03:00
Mikhail Glukhikh 07ff2bff33 Reformat & cleanup: psiModificationUtils, especially PsiElement.replaced 2018-08-06 19:04:04 +03:00
Mikhail Glukhikh 1d2438e04e Report SUPERTYPE_NOT_INITIALIZED even if no constructors in superclass
Before this commit, expect super-class without constructors did not
provoke SUPERTYPE_NOT_INITIALIZED. However, it should, but only
if sub-type is normal class (not an expect one).

So #KT-24597 Fixed
2018-08-06 19:02:24 +03:00
Vyacheslav Gerasimov 6db2037440 Make JavaToKotlinAction.convertFiles compatible with AS 3.3 2018-08-06 18:39:00 +03:00
Mikhail Zarechenskiy 1972387022 Fix test data after 6d4d244c28 2018-08-06 17:45:24 +03:00
Mikhail Zarechenskiy 659289b41a Report diagnostics about experimentality on unsigned literals
#KT-25580 Fixed
2018-08-06 17:45:22 +03:00
Mikhail Zarechenskiy 55e7def3c1 Fix coercion for stack value property in case of inline classes
#KT-25771 Fixed
2018-08-06 17:45:20 +03:00
Bloder f89803fe8f Create samples for String.toLowerCase/toUpperCase
* Create toLowerCase method sample
* Create toUpperCase method sample
* Create toUpperCase sample reference in StringsJVM
* Create sample ref and doc of js impl toUpperCase
* Create sample ref and docs of js toLowerCase
* Add sample ref in toLowerCase expect fun
* Add sample ref in toUpperCase expect fun
2018-08-06 15:34:57 +03:00
Vyacheslav Gerasimov e41f468bd8 Update compiler.pro for 183 platform 2018-08-06 15:08:03 +03:00
Vyacheslav Gerasimov f712759a3e Make isReferenceTo parameter NotNull, annotated in 183 platform 2018-08-06 15:08:03 +03:00
Ilya Chernikov a3d719785c Drop exception/stacktrace from logging warning if a script template is not found in the classpath
reducing clutter in logs and console
#KT-24754 fixed
2018-08-06 13:58:49 +02:00
Alexander Udalov 6f9441d3f4 Do not output empty non-root packages in tests with txt
Mostly to avoid listing every internal package in
kotlin-stdlib/kotlin-reflect, as in
https://github.com/JetBrains/kotlin/blob/acd5b62148d797ffd24c4811d1d663f0c1ae7885/compiler/testData/diagnostics/testsWithUnsignedTypes/conversions/conversionOfSignedToUnsigned.txt#L144
2018-08-06 13:43:32 +02:00
Alexander Udalov ccb6410823 Rework and move the pull request checklist to a new section in ReadMe
Otherwise this text appears in numerous pull requests and contributors
do not understand what to do with it
2018-08-06 13:41:49 +02:00
Alexander Udalov 4c7bdf5437 Minor, fix typos in ReadMe 2018-08-06 13:41:49 +02:00
Mikhael Bogdanov ddf6bdffcf Move jvm ir tests to jvm ones 2018-08-06 13:57:43 +03:00
Natalia Selezneva 0e8b93bf35 Use IDELanguageSettingsProvider getting languageVersionSettings and targetPlatform during analysis 2018-08-06 10:41:42 +02:00
Ilya Chernikov f2395bac2f Use script compiler options to calculate target platform in IDE
#KT-25822 fixed
2018-08-06 10:41:41 +02:00
Vyacheslav Gerasimov 0cf6b26494 as32: Set since-build to 181.5281 (AS 3.2 Beta 5) 2018-08-06 11:15:50 +03:00