^KT-59665 Fixed Review: https://jetbrains.team/p/kt/reviews/11039/timeline It's better to have this logic in common place (AbstractExpectActualCompatibilityChecker) to avoid missing compilation errors in the future This commit fixes: 1. Missing compilation error for actual function with default arguments for 'actual typealias' KT-59665 2. Missing compilation error for actual function with default arguments for actual fake-override KT-59665 Alternative solution for KT-59665 is to create a special checker. "incompatibility" vs "special checker": Arguments for common incompatibility: - What if we had a rule that expect and actual default params must match? If so then it certainly would be an incompatibility. - Technically, we do the matching of expect and actual params (because we allow default params in common ancestors of expect and actual declarations). - It's hard to check that the actual definition doesn't use default params because `ExpectedActualResolver.findActualForExpected` filters out fake-overrides and doesn't return them. It's not clear logic for me, that I'm afraid to touch. implicitActualFakeOverride_AbstractMap.kt test breaks if you drop this weird logic - WEAK incompatibilities can be considered as "checkers". So it doesn't matter how it's implemented, as a "incompatibility" or a "checker" Arguments against common incompatibility: - Although we match expect and actual declarations to allow default params in common ancestors of expect and actual declarations, it's still can be considered that we check that the actual declaration doesn't have default params. And it doesn't feel right that we check correctness of the actual declaration in expect-actual matcher. - ~~It may change the rules of expect actual matching~~ (It's not true, because ActualFunctionWithDefaultParameters is declared as WEAK incompatibility)
Kotlin Libraries
This part of the project contains the sources of the following libraries:
- kotlin-stdlib, the standard library for Kotlin/JVM, Kotlin/JS and its additional parts for JDK 7 and JDK 8
- kotlin-reflect, the library for full reflection support
- kotlin-test, the library for multiplatform unit testing
- kotlin-annotations-jvm, the annotations to improve types in the Java code to look better when being consumed in the Kotlin code.
These libraries are built as a part of the root Gradle project.
Kotlin Maven Tools
This area of the project is the root for Maven build.
You can work with the maven modules of this maven project in IDEA from the root IDEA project. After importing you'll be able to explore maven projects and run goals directly from IDEA with the instruments on the right sidebar.
Building
You need to install a recent (at least 3.3) Maven distribution.
Before building this Maven project you need to build and install the required artifacts built with Gradle to the local maven repository, by issuing the following command in the root project:
./gradlew install
Note: on Windows type
gradlewwithout the leading./
This command assembles and puts the artifacts to the local maven repository to be used by the subsequent maven build. See also root ReadMe.md, section "Building".
Then you can build maven artifacts with Maven:
mvn install
If your maven build is failing with Out-Of-Memory errors, set JVM options for maven in MAVEN_OPTS environment variable like this:
MAVEN_OPTS="-Xmx2G"