Commit Graph

41766 Commits

Author SHA1 Message Date
Sergey Mashkov 49cbb2219c Maven: reduce maven plugin output
#KT-20400 Fixed
2017-09-29 14:49:41 +03:00
Alexey Sedunov be21a84778 Configuration: Fix modification checking in compiler settings UI
#KT-18996 Fixed
2017-09-29 14:37:04 +03:00
Alexey Sedunov b4847e69e8 Minor: Fix test data 2017-09-29 14:37:04 +03:00
Alexey Sedunov f63e33b23d Modules: Support production-on-test dependency
This feature is supported in IDEA project configuration
and can be used in Maven/Gradle-based projects

 #KT-20112 Fixed
2017-09-29 14:37:04 +03:00
Alexey Andreev 0269c3309a JS: fix parsing of wrong delete operation in js function.
See KT-15294
2017-09-29 14:32:49 +03:00
Alexey Andreev bad50c03a7 JS: support cross-module inlining of suspend functions
See KT-18063
2017-09-29 14:32:49 +03:00
Alexey Andreev 992cc61abc JS: prove that KT-15292 is no more reproducible 2017-09-29 14:32:48 +03:00
Alexey Andreev bf87826dd1 JS: add test to prove that KT-15622 is no more reproducible 2017-09-29 14:32:47 +03:00
Alexey Andreev 43c6f8b9b1 JS: fix copying fun with default args from interface to abstract class
See KT-20451
2017-09-29 14:32:47 +03:00
Simon Ogorodnik 676e5d2a88 Add 1.2-Beta to changelog 2017-09-29 14:20:26 +03:00
Denis Zharkov 13bf35f48e Make TYPE_USE default qualifiers overriding all other applicabilities
If there is default qualifier with TYPE_USE closer than one with METHOD
then its nullability should be considered even when enhancing return type

 #KT-20016 Fixed
2017-09-29 10:01:04 +03:00
Alexey Tsvetkov 62f293280c Gradle: compile tests incrementally when main is changed
#KT-17674 fixed
2017-09-29 05:11:20 +03:00
Ilya Gorbunov 779b9c6fcc Change TeamCity build status badge to point to the compiler build configuration 2017-09-28 22:02:53 +03:00
Francesco Vasco 9ffd0db4a8 Avoid ISUB in kotlin.repeat 2017-09-28 22:02:53 +03:00
Anton Bannykh ab615b7d70 Merge pull request #1321 from JetBrains/abannykh/fix-npm-publish
Don't set publish tag in package.json since it overrides the CLI flags
2017-09-28 19:50:11 +03:00
Anton Bannykh 796e0feaa4 Don't set publish tag in package.json since it overrides the CLI flags 2017-09-28 19:45:44 +03:00
Mikhail Glukhikh e8682fa9b9 Use diagnoseDescriptorNotFound() in findClassDescriptor 2017-09-28 18:43:39 +03:00
Mikhail Glukhikh 5c0bc266b3 Do not use unsafe getClassDescriptor() inside resolveToDescriptor
Introduce getClassDescriptorIfAny / findClassDescriptorIfAny instead
May fix KT-18740 / EA-76201
2017-09-28 18:43:38 +03:00
Mikhail Glukhikh adf0b25c0b LazyDeclarationResolver.kt: convert to Kotlin 2017-09-28 18:43:38 +03:00
Mikhail Glukhikh 04157c4137 LazyDeclarationResolver.java --> kt 2017-09-28 18:43:38 +03:00
Mikhail Glukhikh 5c5776a6b5 Use resolveToDescriptorIfAny in IDELightClassGenerationSupport 2017-09-28 18:43:38 +03:00
Denis Zharkov 5b7c766a54 Use Jsr305State.DEFAULT instead of IGNORE as a default value 2017-09-28 15:38:27 +03:00
Denis Zharkov dd2630e5c6 Fix loading additional compiler arguments from facets for libraries 2017-09-28 15:38:11 +03:00
Mikhail Glukhikh 43f1dbeabf Introduce cached ModuleDescriptor.implementingDescriptors
This property is used instead of findImplementingDescriptors,
which is basically too slow
2017-09-28 15:15:03 +03:00
Mikhail Glukhikh fa23471397 Add test for KT-19222 to fix behaviour
Issue was fixed together with KT-17374
So #KT-19222 Fixed
2017-09-28 15:15:02 +03:00
Mikhail Glukhikh 5687fe6e39 Introduce ModuleDescriptor.findImplementingDescriptor() via facets
This function is now used instead of allImplementingCompatibleModules,
thus allowing it to be deleted together with allImplementingModules

So #KT-17369 Fixed
So #KT-17374 Fixed
May fix also some other MPP issues
2017-09-28 15:15:02 +03:00
Mikhail Glukhikh c9f11e4bc2 Add implements common dependency for regular multiplatform tests 2017-09-28 15:15:02 +03:00
Mikhail Glukhikh 848a80a266 Add test (with incorrect work yet) for KT-17374 2017-09-28 15:15:01 +03:00
Mikhail Glukhikh 390de737e7 Fix messages in some multi platform highlighting tests 2017-09-28 15:15:01 +03:00
Mikhail Glukhikh 5edeb359c8 Split multi module and multi platform highlighting tests
Now both of them can execute without problems
2017-09-28 15:15:01 +03:00
Dmitry Petrov 3158700500 Add test for generic setValue called via synthetic accessor
Synthetic accessor for 'setValue' was generated incorrectly,
specific case of KT-20491 (Incorrect synthetic accessor generated for a
generic base class function specialized with primitive type).

Make sure there's no equivalent of KT-20387 for delegated properties.
2017-09-28 14:55:11 +03:00
Dmitry Petrov f4f1ea91d9 Use accessible get/set arguments for collection element receiver
When generating collection element receiver (such as 'a[i]'), accessible
descriptor for get/set operator should be used.
Otherwise, if the corresponding get/set operator fun is called via an
accessor, its argument types may be different in case of generic fun
specialized with primitive types.

 #KT-20387 Fixed
2017-09-28 14:55:11 +03:00
Dmitry Petrov 3994034f46 Keep track of synthetic accessor parameter types
Accessor parameter types may be different from callee parameter types
in case of generic methods specialized by primitive types:

  open class Base<T> {
    protected fun foo(x: T) {}
  }

  // in different package
  class Derived : Base<Long> {
    inner class Inner {
      fun bar() { foo(42L) }
    }
  }

Synthetic accessor for 'Base.foo' in 'Derived' has signature '(J)V'
(not '(Ljava.lang.Object;)V' or '(Ljava.lang.Long;)V'),
and should box its parameter.

Note that in Java the corresponding synthetic accessor has signature
'(Ljava.lang.Long;)V' with auto-boxing at call site.

 #KT-20491 Fixed
2017-09-28 14:55:11 +03:00
Dmitry Petrov 73724bcdc7 Do not copy immediately created arrays in spread arguments
E.g., 'foo(x = *intArrayOf(42))'.

 #KT-20462 Fixed
2017-09-28 14:55:11 +03:00
Denis Zharkov 0d5a2a7e18 Minor. Drop unused class ScopeLevelsAndSkippedForLookups 2017-09-28 14:01:30 +03:00
Denis Zharkov 12b348ae48 Fix incorrectly configured IDE tests
The important changes are in ideaTestUtils.kt:
`configureByFiles` must be called on the relative to testData dir path,
otherwise java files in the project belong to src/idea/testData/.../A.java
instead of src/A.java and can't be found in the root package

New updates in resolution when resolving A() call is now asking whether
<root>.A exists in PsiPackage::getClasses instead of
PsiPackage::findClassByShortName that can find a class even if it's located
in the wrong directory
2017-09-28 14:01:30 +03:00
Denis Zharkov 5b01a32bd3 Extract val isNameForHidesMember 2017-09-28 14:01:30 +03:00
Denis Zharkov 1f23d610a6 Extract TowerResolver.Task::processImplicitReceiver 2017-09-28 14:01:30 +03:00
Denis Zharkov 6b97203979 Move all state from TowerResolver.Task::run to Task class
Also extract local functions from it and introduce
TowerData.ForLookupForNoExplicitReceiver class
2017-09-28 14:01:30 +03:00
Denis Zharkov c7fda42ccc Introduce TowerResolver.Task class
Its main purpose is code simplification: ImplicitScopeTower::run
contains a lot of local functions that are needed because of
lots of shared state

So, we're moving the state to the Task class instead

NB: This change doesn't change the code of `run`, it will be done
in further commits
2017-09-28 14:01:30 +03:00
Denis Zharkov b77cc54122 Update lookupTracker testData
Just the order of lookups has been changed
2017-09-28 14:01:30 +03:00
Denis Zharkov b1387b2ae7 Make call resolution responsible for calling recordLookups
The idea is that all tower levels are partitioned into two groups:
- ones that may contain the target name or INVOKE; they're processed as usual
- ones that can't contain the name; they're simply skipped until
the end of resolution process when it's being passed to scope processors
to allow them record necessary lookups
2017-09-28 14:01:30 +03:00
Denis Zharkov 265794e712 Add necessary ResolutionScope::recordLookup implementations 2017-09-28 14:01:30 +03:00
Denis Zharkov 580a7e3e4d Drop location parameter from ResolutionScope::definitelyDoesNotContainName
definitelyDoesNotContainName is called too eagerly sometimes and it leads
to obviously redundant lookups

The idea is to put responsibility for calling recordLookup to resolution
itself
2017-09-28 14:01:30 +03:00
Denis Zharkov 37440c70e2 Optimize invoke processors
- Avoid creating of empty KnownResultProcessor for variables
- Do not consider definetely inapplicable tower data
2017-09-28 14:01:30 +03:00
Denis Zharkov 860951748f Filter out inapplicable member scopes in resolution 2017-09-28 14:01:30 +03:00
Denis Zharkov d0bf0f5fb3 Filter out inapplicable non-local levels for implicit receivers 2017-09-28 14:01:30 +03:00
Denis Zharkov 51d3969822 Do not run resolution processors for inapplicable statics 2017-09-28 14:01:30 +03:00
Denis Zharkov c018a76aaa Use the same default import scopes for all files in module 2017-09-28 14:01:30 +03:00
Denis Zharkov 3322ed6e04 Implement LazyImportResolver::definitelyDoesNotContainName 2017-09-28 14:01:30 +03:00