Commit Graph

57967 Commits

Author SHA1 Message Date
Georgy Bronnikov 7e9cfbc91a IR: use toLowerCaseAsciiOnly 2019-10-01 16:43:23 +03:00
Igor Yakovlev a68090db5a Fix 191 branch build 2019-10-01 16:27:16 +03:00
Mark Punzalan a01c53fb74 Use getPropertyGetter() in ForLoopsLowering to retrieve property
getters instead of directly retrieving the property first.

When the IR backend is used to compile the standard library, the
progression classes (in sources) are lowered, and therefore do not have
properties anymore (only fields and functions).
2019-10-01 13:34:59 +02:00
Igor Yakovlev a19c5f944e Mute tests with new tickets to resolve it later
Muted test with next tickets:
https://youtrack.jetbrains.com/issue/KT-34105
https://youtrack.jetbrains.com/issue/KT-34106
https://youtrack.jetbrains.com/issue/KT-34107
2019-10-01 13:53:21 +03:00
Igor Yakovlev 8def1f07aa Fix testClassObjectCopiedFieldObject test
Fix of the test
PsiCheckerTestGenerated$DuplicateJvmSignature$Fields.testClassObjectCopiedFieldObject
additionally fixed the bug with blinking this test example in IDEA with UL classes enabled.

The story:
Extra diagnostics could be requested for any KtClassOrObject but for _nested_  classes result may depend on outer class members signature collecting. So the the order of outer/nested diagnostic reporting takes matter.
So for nested classes/objects we have to gen members of outer classes.
2019-10-01 13:53:21 +03:00
Igor Yakovlev de5fb347e7 Fix SyntheticPropertyUsages tests
testJavaGetterToOrdinaryMethod_JavaGetterToOrdinaryMethod
testSyntheticPropertyUsages1_RenameGetMethod

from 192 disabled to call findReferences(elem), so overload does not worked
2019-10-01 13:53:21 +03:00
Igor Yakovlev ca9e760379 Remove redundant analyzeWithAllCompilerChecks from NoArg plugin test 2019-10-01 13:53:20 +03:00
Igor Yakovlev cef6b71897 Fix ultraLightClass method argument types erasure
Fix IdeRegression.testImplementingMap test
2019-10-01 13:53:20 +03:00
Igor Yakovlev c5fc55b84c Fix exception when Enum.valueOf got an invalid argument value
#Fixed KT-30515
2019-10-01 13:53:20 +03:00
Mark Punzalan 9daea89221 Avoid duplicate IR elements in ForLoopsLowering (accidentally introduced
in #2620).
2019-10-01 12:40:50 +02:00
Vladimir Dolzhenko 3b563eaca1 Use test path relative to testDataPath in fixture.configureByFile to be complaint with 193, part 2 2019-10-01 11:39:17 +02:00
Andrey Uskov d7a2de59ac Import: support mixing of TaskProviders and Tasks in task executors
#KT-34101 Fixed
2019-10-01 08:30:12 +03:00
Andrey Uskov 6d9be0ab5d Fix MPP import tests 2019-10-01 08:30:09 +03:00
Andrey Uskov c0f2be478f Fix calculation of target platform for common test modules for NMPP
#KT-34070 Fixed
2019-10-01 08:30:07 +03:00
Anton Yalyshev 9af6efcb24 Return old-style DSL for Gradle versions < 5.0 2019-10-01 07:18:00 +02:00
Ilya Gorbunov 2106274fa3 Minor: fix Charset type reference in kdoc
#KT-34086 Fixed
2019-10-01 03:01:11 +03:00
Shagen Ogandzhanian 3181d02d11 Update dukat dependency to 0.0.19 2019-09-30 23:30:50 +02:00
Georgy Bronnikov 53b7766910 IR: call toLowerCase() with root locale
Preventing complexities with Turkish Iı vs. İi.
2019-09-30 22:55:19 +03:00
Denis Zharkov f91db5f0b8 Restore correct overloads ambiguity accidentally removed in 1.3.60
This problem is only relevant when isTypeRefinementEnabled == true (HMPP projects)

Ambiguity accidentally was removed after 471134d
There, for areCallableDescriptorsEquivalent we stopped assuming
as impossible a situation of having identity-different descriptors
in the same containing declaraton that still might be considered equal

So, before 471134d we were comparing
"fun foo(x: String)" with "[substituted] fun foo(x: String)"
and areCallableDescriptorsEquivalent returned false for such case.
Thus, both overrides were left in the resulting set.

After 471134d, those two descriptors
becamed considered as equal thus having a possibility to remove any of them.

The problem is that "areCallableDescriptorsEquivalent" has kind of
unclear contract. Effectively it checks whether two descriptors match
to the same declaration.

But some of the usages expect that it also makes sure that descriptors
have the same substitution (see org.jetbrains.kotlin.resolve.calls.smartcasts.IdentifierInfo.Variable#equals)

So, the straight solution is using original descriptors for the cases
where we need to make sure that descriptors relates to actually different
declarations

^KT-34027 Fixed
2019-09-30 20:09:42 +03:00
Denis Zharkov 67410f7a57 Parametrize behavior of DescriptorEquivalenceForOverrides::areCallableDescriptorsEquivalent
The changes introduced 471134d31e are only needed
for the case of HMPP project while for other cases it might break the behavior
a bit like in KT-34027

See org.jetbrains.kotlin.resolve.calls.results.OverloadingConflictResolver#filterOutEquivalentCalls

Before 471134d we were comparing
"fun foo(x: String)" with "[substituted] fun foo(x: String)"
and areCallableDescriptorsEquivalent returned false for such case.
Thus, both overrides were left in the resulting set.

After 471134d, those two descriptors
becamed considered as equal thus having a possibility to remove any of them.

The problem is that "areCallableDescriptorsEquivalent" has kind of
unclear contract. Effectively it checks whether two descriptors match
to the same declaration

But straightforward fixing of this exact call-site (using original descriptors)
doesn't help: behavior might change in a very subtle way (see org.jetbrains.kotlin.spec.checkers.DiagnosticsTestSpecGenerated.NotLinked.Dfa.Pos#test72)

So, the main idea is changing the contract for areCallableDescriptorsEquivalent
only when project is HMPP one.

^KT-34027 In Progress
2019-09-30 20:09:42 +03:00
Ilmir Usmanov 08794d17a0 Do not box function argument if it is used in EXACTLY_ONCE lambda
Since we cannot change type of parameter, we cannot replace it with
box type.
 #KT-29510 Fixed
 #KT-29614 Fixed
 #KT-29385 Fixed
2019-09-30 17:42:17 +03:00
Ilya Goncharov c5ba19451f Fix leading zero for percents less than 10
- To avoid status text jumping
2019-09-30 16:53:25 +03:00
Ilya Goncharov 305b6091cd Consider, that ':' can be in file path (Windows case)
#KT-31478 fixed
2019-09-30 16:53:24 +03:00
Ilya Goncharov 923ecaf6b9 Fix js quoted strings for Windows 2019-09-30 16:50:42 +03:00
Ilya Goncharov 842cbf51c9 Assign of revertMethods instead of copying 2019-09-30 16:50:42 +03:00
Ilya Goncharov 9a5f937f2d Fix progress percentage 2019-09-30 16:50:42 +03:00
Ilya Goncharov 71963de70c Move revertible methods to finally 2019-09-30 16:50:42 +03:00
Ilya Goncharov 7680c21fb6 Print parsed stack trace 2019-09-30 16:50:42 +03:00
Ilya Goncharov e911e0acbb Only parsed stacktrace consider
- NodeJs and Karma testing logging, exception handling and source maps works consistently
2019-09-30 16:50:42 +03:00
Ilya Goncharov 2ac24efc8b Process stack trace for karma 2019-09-30 16:50:42 +03:00
Ilya Goncharov 7010c03706 Move Karma Kotlin reporter to kotlin-test-js-runner 2019-09-30 16:50:42 +03:00
Ilya Goncharov fa4f39f5eb Use own format error for source maps processing in karma reporter 2019-09-30 16:50:42 +03:00
Ilya Goncharov 9f64c426e5 Parse stack trace for extract original sources 2019-09-30 16:50:41 +03:00
Ilya Goncharov a5c8882ccb Format error for teamcity log reporter
- formatError contains source map processing
2019-09-30 16:50:41 +03:00
Ilya Goncharov efe8c2fa7c Remove redundant karma-source-map-support 2019-09-30 16:50:41 +03:00
Ilya Goncharov 36d9fe5a3a Add process stack trace for failing tests 2019-09-30 16:50:41 +03:00
Ilya Goncharov 3ca3842c3f Fix format 2019-09-30 16:50:41 +03:00
Ilya Goncharov fb97375f86 Remove redundant debug flag for karma start 2019-09-30 16:50:41 +03:00
Ilya Goncharov b22e56e1ba Fix IE karma alias 2019-09-30 16:50:41 +03:00
Ilya Goncharov bbe51469ee Add devtool property for webpack
- Use inline-source-map for karma-webpack
2019-09-30 16:50:41 +03:00
Sergey Rostov 4c579f5286 build.gradle.kts: collect statistics about auto reload, fix 183 as as34 2019-09-30 14:08:43 +03:00
Nikolay Krasko 552408e887 Minor: update test data for quick doc with deprecated annotation 2019-09-30 13:38:27 +03:00
Nikolay Krasko 2ec231f381 Minor: fix CompletionMultiFileHandlerTest test 2019-09-30 13:38:27 +03:00
Nikolay Krasko 751a18e64b Minor: update test data PartialBodyResolveTestGenerated 2019-09-30 13:38:26 +03:00
Natalia Selezneva 064689b6b7 Merge pull request #2467 from t-kameyama/KT-14756
KT-14756 Move statement down breaks code in argument list
2019-09-30 13:19:07 +03:00
Mikhail Zarechenskiy 932d84d568 Fix performance regression in NI by fixing totally incorrect hashCode
The actual problem was introduced in 4f1e85b468, note how `hashCode` is implemented:
```
var currentHashCode = cachedHashCode
if (currentHashCode == 0) return currentHashCode
...
```
It's a silly bug, there should be check `if (currentHashCode != 0) ...` because `0` is used a marker for "uncomputed value".

Now, in the commit 0219b86d06 I added map with `KotlinType` as a key and because of constant `hash` for `KotlinType`, we basically got `List` instead of `Map`, which caused this performance regression

 #KT-34063 Fixed
2019-09-30 10:22:30 +03:00
Mikhail Zarechenskiy 957af741cd [NI] Don't forget marker interface for type variables 2019-09-30 10:22:30 +03:00
Natalia Selezneva 66a6713577 Tests: extract scripts testdata for light classes in ide to separate test
For compiled scripts there is AbstractIdeCompiledLightClassTest
For now there is a difference in light classes constructed from source and from compiled class (missing baseClass and constructor parameter for script class)
But it doesn't affect users because calling script class from Java isn't supported yet

testData for AbstractIdeLightClassTest and AbstractIdeLightClassForScriptTest can be merged when the difference will be fixed
2019-09-30 09:47:20 +03:00
Sergey Rostov 46f8feaf98 build.gradle.kts: collect statistics about auto reload 2019-09-30 09:44:52 +03:00
Alexey Tsvetkov 6c90279694 Ensure all output roots exist after Kotlin is compiled in JPS 2019-09-30 09:03:49 +03:00