Commit Graph

15879 Commits

Author SHA1 Message Date
Mikhael Bogdanov 232d1bd9ef Switch warning to error for java-default method calls within 1.6 target
#KT-15825 Fixed

(cherry picked from commit 9b29ebb)
2017-10-11 19:20:24 +03:00
Dmitry Savvinov 87b85ce978 Fix testdata for tests which use varargs
Change tests to use new syntax for array literals to prevent deprecation
warnings (see KT-20171).
2017-10-11 18:06:00 +03:00
Ilya Chernikov 279126ad7e Add stdlib to gradle scripts classpath, since it is not included into compiler anymore 2017-10-11 16:24:42 +02:00
Paul Merlin e911a1e53d Script template provider for settings.gradle.kts files
This commit introduces GradleSettingsKotlinDSLTemplateProvider and
registers it as Kotlin IntelliJ plugin extension.
2017-10-11 16:19:56 +02:00
Mikhail Zarechenskiy 88595e1a58 Don't require to override abstract methods in expect class
#KT-16099 Fixed
2017-10-11 15:27:50 +03:00
Dmitry Savvinov 175d23155e Effects: add (de)serialization of contracts in metadata
- Introduce new definitions in descriptors.proto
- Add new corresponding values in Flags.java
- Introduce ContractSerializer and ContractDeserializer, responsible for
for conversion ContractDescription <-> ProtoBuf.Contract
- Add dependency of 'serialization' module on 'resolution' so that it
could see contracts model.

Note that here we do a lot of seemingly unnecessary hoops, which in fact
necessary to respect existing module system (in particular, to be able
to extract ContractDescription declarations from 'descriptors' module to
make them invisible from reflection)

==========
Effect System introduction: 8/18
2017-10-11 13:34:54 +03:00
Dmitry Savvinov 2c0ef592e6 Effects: add DSL for declaration of contracts
- Introduce DSL for declaration of contracts. Functions and classes in
this DSL do not bear any computational semantics: in fact, they all do
not exist on runtime. Whole work of extracting semantics from such calls
is done by special parts of compiler

- To make distinguishing those declarations more robust and
convenient, introduce internal annotation @ContractsDSL

- Turn off InlineChecker inside contracts DSL. We do this, because some
functions from DSL should take any possible lambda, so we can't write
any type besides 'Function<R>'. However, InlineChecker will complain if
we will pass inlined lambda in such function -- though, this is false
positive because we know that functions from contracts DSL will never be
executed

- Change testData on HierarchyTestWithLib, where new enum from
kotlin.internal changed expected output

==========
Effect System introduction: 7/18
2017-10-11 13:34:54 +03:00
Dmitry Jemerov ee72cc268c Fix NSEE if there's no JVM implementation module (KT-20638) 2017-10-11 12:27:01 +02:00
Dmitry Jemerov dc7ffdcbe4 Add missing read action 2017-10-11 12:26:59 +02:00
Dmitry Jemerov 6c7f558d36 Add missing FileModificationService call (EA-107395) 2017-10-11 12:26:39 +02:00
Dmitry Jemerov c2efdfe243 Add space before 'where' keyword
#KT-19213 Fixed
2017-10-11 12:25:53 +02:00
Dmitry Jemerov f2a7e7f238 Show argument name hints for function type calls only for known names
#KT-19216 Fixed
2017-10-11 12:25:52 +02:00
Dmitry Jemerov af09f5a49f Enable argument name hints for annotations
#KT-19146 Fixed
2017-10-11 12:25:51 +02:00
Mikhail Glukhikh e37bfa13e3 Related to KT-20713: add test for find usages in script 2017-10-10 22:48:42 +03:00
Mikhail Glukhikh c5cb45794a Fix CCE in ReplaceAddWithPlusAssignIntention #KT-20183 Fixed 2017-10-10 22:48:39 +03:00
Mikhail Glukhikh fd95769780 Code cleanup: ReplaceAddWithPlusAssignIntention 2017-10-10 22:48:37 +03:00
Mikhail Glukhikh 45c9be2945 Fix problem with mutable map in "simplifiable call chain"
So #KT-20315 Fixed
2017-10-10 22:48:35 +03:00
Mikhail Glukhikh 8e59d3e379 Handle modifiers correctly in "val to object" #KT-18919 Fixed 2017-10-10 22:48:33 +03:00
Mikhail Glukhikh 0b5b5d8e89 Suggest primitive array type for collection literals in "add type" fix
So #KT-18549 Fixed
2017-10-10 22:48:30 +03:00
Mikhail Glukhikh e65112fcab Disable "Replace camel-case name with spaces" intention for JS / common
So #KT-18773 Fixed
2017-10-10 22:48:28 +03:00
Denis Zharkov cb7d561c6c Add cache for declaration names in StubBasedPackageMemberDeclarationProvider
#KT-20683 Fixed
2017-10-10 18:34:31 +03:00
Denis Zharkov 1c9b454d90 Rename KotlinTypeFactory::simpleType to simpleTypeWithNonTrivialMemberScope
To state it must be used only for limited number of cases
2017-10-10 18:27:00 +03:00
Nikolay Krasko eb32f5478a Minor: use special extension 2017-10-10 16:29:22 +03:00
Nikolay Krasko 6664b7759b Configure kotlin.stdlib for gradle projects (KT-19207)
#KT-19207 Fixed
2017-10-10 16:29:22 +03:00
Nikolay Krasko 023067aaf2 Allow to use folders for gradle configuration tests 2017-10-10 16:29:22 +03:00
Nikolay Krasko cc0a9070b9 Add kotlin.stdlib to module-info when configure Maven project (KT-19207)
#KT-19207 In Progress
2017-10-10 16:29:22 +03:00
Nikolay Krasko c0e6cb8b92 Log module name when maven project wasn't found in manager 2017-10-10 16:29:21 +03:00
Nikolay Krasko f05e4c922b Minor: use another method 2017-10-10 16:29:21 +03:00
Nikolay Krasko 65798cdd81 Minor: optimize imports and clean up 2017-10-10 16:29:21 +03:00
Nikolay Krasko 9d122a275a Update module-info only for Java configurator (KT-19207)
#KT-19207 Fixed
2017-10-10 16:29:21 +03:00
Alexey Sedunov ea8f3dcc65 Go to Implementation: Support suspend functions 2017-10-10 13:15:16 +03:00
Alexey Sedunov 21bf4d3f24 Rename: Suspend function support 2017-10-10 13:15:15 +03:00
Toshiaki Kameyama c5b7d0f0df Remove parentheses after deleting the last unused constructor parameter
So #KT-16636 Fixed
2017-10-10 11:55:27 +03:00
Mikhail Glukhikh 7ade2bb708 Move CreateActualFix to expectactual package 2017-10-10 10:45:12 +03:00
Mikhail Glukhikh 104826e0a9 Line markers: use descriptors in isExpect/ActualDeclaration 2017-10-10 10:45:10 +03:00
Mikhail Glukhikh 1bf0424b1c Set line marker on expect constructor '(' if no constructor keyword 2017-10-10 10:44:51 +03:00
Mikhail Glukhikh 4bfaa46c15 Add correct mapping of module descriptor to implementedDescriptor
Now implements dependency is taken into account here
Old commonModuleOrNull() was deleted
Test (JVM + 2xCommon) was added
2017-10-10 10:44:44 +03:00
Mikhail Glukhikh b5e2fa5f94 Add line marker test for type aliases #KT-20164 Fixed 2017-10-10 10:44:39 +03:00
Mikhail Glukhikh eec8be2c21 Add line marker test for primary constructors #KT-20254 Fixed 2017-10-10 10:44:38 +03:00
Mikhail Glukhikh 0ebe9d576a Add line marker test for sealed classes #KT-20043 Fixed 2017-10-10 10:44:36 +03:00
Mikhail Glukhikh 4e56fda439 Introduce isExpect/ActualDeclaration in KotlinLineMarkerProvider
Treat every member of expect declaration as expect declaration itself
So #KT-18455 Fixed
2017-10-10 10:44:35 +03:00
Mikhail Glukhikh ceab148b09 Expect/actual markers: handle secondary constructors correctly
So #KT-20309 Fixed
2017-10-10 10:44:33 +03:00
Kirill Rakhman 91c35a6c59 Support listOfNotNull in SimplifiableCallChainInspection #KT-20410 Fixed 2017-10-09 16:38:52 +03:00
Vyacheslav Gerasimov 62d0e4a51a Add name for GradleProjectImportProvider
#KT-20648 Fixed
2017-10-09 14:40:35 +03:00
Toshiaki Kameyama 0bda2732e5 Fix for KT-19134 IntelliJ Color Scheme editor - allow changing color of colons and double colons (#1314) 2017-10-09 11:02:02 +02:00
Ilya Chernikov cff6d8cf17 Refactor context classpath discovery, share it to idea's jsr223 host...
...from script-util
fix daemon usage in repls
define compiler classpath for script-util tests explicitly
minor refactorings in the build scripts for better import into idea
2017-10-06 20:12:51 +02:00
xiexed 12e35ccf96 KotlinUastBindingContextProviderService moved to plugin.xml (#1303) 2017-10-06 19:17:25 +02:00
Mikhail Glukhikh e1ccd3afc5 Inspection: do not report anything with manual INFORMATION level offline
So #KT-20369 Fixed
So #KT-20333 Fixed
2017-10-06 16:21:04 +03:00
Toshiaki Kameyama ec64a7e422 Insert brackets in "Convert reference to lambda" if necessary
So #KT-16394 Fixed
2017-10-06 16:20:45 +03:00
Dmitry Jemerov 85254838f6 Allow building UAST for in-memory virtual files 2017-10-06 14:43:22 +02:00