Commit Graph

7729 Commits

Author SHA1 Message Date
Tamas Vajk
ec5ac17f87 Kotlin: Excluded compiler generated methods from java/confusing-method-signature 2022-11-02 09:40:31 +01:00
Tamas Vajk
556c199a89 Kotlin: Add test case for confusingly overloaded $default method 2022-11-02 09:40:31 +01:00
Tamas Vajk
91972d1d1f Kotlin: Fix location (start position) of method calls 2022-10-31 21:08:15 +01:00
Ian Lynagh
21600c612d Merge pull request #11037 from igfoo/igfoo/log
Kotlin: Integration tests: Allow \ as a path separator in logs test
2022-10-31 14:03:57 +00:00
Tamás Vajk
e356720c73 Merge pull request #11014 from tamasvajk/kotlin-for-loop-var
Kotlin: Resugar `for` loops
2022-10-31 14:48:21 +01:00
Ian Lynagh
a53c2104d1 Kotlin: Integration tests: Allow \ as a path separator in logs test 2022-10-31 11:24:39 +00:00
Tamas Vajk
4cd0f1ca66 Apply code review findings 2022-10-31 08:43:53 +01:00
Chris Smowton
b370497f96 Avoid split overrides 2022-10-29 18:23:45 +01:00
Chris Smowton
8266a22332 Kotlin: fix method types when an inherited method implements a collection type
In this circumstance the compiler seems to generate a specialised version of the implementing function with its argument type replaced by the interface-implementing child class' type parameter. However it stores a back-pointer to the real declared function, which we should use as the call target.
2022-10-29 11:29:04 +01:00
Dave Bartolomeo
85790fcade Merge pull request #10964 from smowton/smowton/admin/modernise-qlpacks
qlpacks: libraryPathDependencies -> dependencies
2022-10-28 16:44:22 -04:00
Chris Smowton
d9744c81b7 Merge pull request #11017 from smowton/smowton/fix/kotlin-wildcard-suppression-annotation
Kotlin: fix wildcard suppression where the annotation applies to a parent type/argument.
2022-10-28 18:33:07 +01:00
Ian Lynagh
84427e132e Kotlin: Move the logs test to all-platforms 2022-10-28 17:56:41 +01:00
Chris Smowton
1914a114a2 Merge pull request #11018 from smowton/smowton/fix/kotlin-extension-specialisation
Kotlin: specialise extension receivers the same as other function parameters
2022-10-28 16:15:41 +01:00
Chris Smowton
d6e2f5f4a8 Use ?.not() to negate a nullable boolean 2022-10-28 16:13:55 +01:00
Chris Smowton
1e1c9f639c Avoid Kotlin 1.5+ function firstNotNullOfOrNull 2022-10-28 16:13:55 +01:00
Chris Smowton
24f87ac963 Kotlin: fix wildcard suppression where the annotation applies to a parent type/argument.
In the process I also fix the missed case where suppression can be switched off using a parameterized annotation.
2022-10-28 16:13:55 +01:00
Ian Lynagh
2796d60d79 Merge pull request #11019 from igfoo/igfoo/win_integ
Kotlin: Get some integration tests running on Windows
2022-10-28 16:12:15 +01:00
Chris Smowton
ee63e60bb7 qlpacks: libraryPathDependencies -> dependencies 2022-10-28 16:07:36 +01:00
Ian Lynagh
49425e6c2a Kotlin: Integration tests: Make a couple more posix-only for now 2022-10-28 13:59:36 +01:00
Tamas Vajk
d745381ebe Remove unneeded consistency test output 2022-10-28 14:56:25 +02:00
Tamas Vajk
803a97df7f Kotlin: Resugar for loops with tuples as loop variables 2022-10-28 14:55:50 +02:00
Tamas Vajk
841340b266 Kotlin: Resugar for loops 2022-10-28 14:55:50 +02:00
Tamas Vajk
1e3060598f Kotlin: Add for loop tests 2022-10-28 14:55:50 +02:00
Tamás Vajk
caf9ac50d9 Merge pull request #11026 from tamasvajk/kotlin-remove-kotlin-java-eq-test
Kotlin: Remove `javaEquivalent` consistency query
2022-10-28 14:08:53 +02:00
Chris Smowton
366410ee9e Fix incorrect parameter ordering 2022-10-28 12:58:23 +01:00
Ian Lynagh
f387eb21eb Kotlin: Integration tests: Add a qlpack.yml 2022-10-28 10:53:45 +01:00
Ian Lynagh
382c08e3cd Kotlin: Fix some integrations tests on Windows 2022-10-28 10:53:45 +01:00
Ian Lynagh
15d5369bdd Kotlin: Run some integration tests on Windows too 2022-10-28 10:53:45 +01:00
Tamás Vajk
8bc46d5e56 Merge pull request #11025 from tamasvajk/kotlin-fix-external-location
Kotlin: Fix external location in integration test
2022-10-28 11:33:25 +02:00
Tamas Vajk
7ceadb0df0 Kotlin: Remove javaEquivalent consistency query
The `javaEquivalent` consistency query is no longer needed, as the `diags` query is now a superset of it.
2022-10-28 10:44:42 +02:00
Rasmus Wriedt Larsen
8628ff5e52 Merge pull request #10999 from RasmusWL/inline-fail-tag
InlineExpectationsTest: Fail if missing `getARelevantTag`
2022-10-28 10:35:49 +02:00
Tamas Vajk
99880c980c Kotlin: Fix external location in integration test 2022-10-28 10:24:14 +02:00
Chris Smowton
45a4cd89a6 Kotlin: specialise extension receivers the same as other function parameters
This arises when a generic class extends one of its parameters; for example, `class G<T> { val T.v; get() = 1 }`, where specialisation `G<List>` should generate a method specialisation `getV(List)`.
2022-10-27 18:31:19 +01:00
Chris Smowton
5ef99ca5bd Merge pull request #11003 from smowton/smowton/fix/reintroduce-pointless-wildcards
Kotlin: reintroduce pointless wildcards when a Java declaration explicitly uses them
2022-10-27 16:06:21 +01:00
Ian Lynagh
6533e2ea5c Merge pull request #10976 from igfoo/igfoo/version
Kotlin: Ignore tags when comparing versions
2022-10-27 15:50:39 +01:00
Ian Lynagh
b4242dd913 Merge pull request #11012 from igfoo/igfoo/mkdir
Kotlin: Fix integration tests on Mac
2022-10-27 15:39:10 +01:00
Rasmus Wriedt Larsen
b840e8efb8 Java: Remove MISSING: XssSink annotations from text/plain responses in JaxWs 2022-10-27 15:55:14 +02:00
Rasmus Wriedt Larsen
cee9139a0d Java: Correctly annotate missing XSS sinks in JaxWs modeling 2022-10-27 15:17:17 +02:00
Ian Lynagh
f237360d81 Merge pull request #11011 from igfoo/igfoo/modules
Kotlin: Handle /modules/... paths specially too
2022-10-27 13:48:32 +01:00
Ian Lynagh
6c232f95bc Kotlin: Fix integration tests on Mac 2022-10-27 13:48:04 +01:00
Rasmus Wriedt Larsen
adf109b624 Merge branch 'main' into inline-fail-tag 2022-10-27 13:42:32 +02:00
Ian Lynagh
bafa80667c Kotlin: Handle /modules/... paths specially too
On Windows, we don't want a C: prefix on these either.
2022-10-27 12:24:28 +01:00
Ian Lynagh
6d77b34323 Merge pull request #11000 from igfoo/igfoo/unknown-binary-location
Kotlin: Handle /!unknown-binary-location/... paths specially on Windows
2022-10-27 12:09:32 +01:00
Jeroen Ketema
1d7efd8e82 Merge pull request #10905 from jsoref/spelling-code-scanning-product
Spelling code scanning product
2022-10-27 12:55:37 +02:00
Tamas Vajk
1727fcb845 Kotlin: fix test to expect diagnostic 2022-10-27 09:14:23 +02:00
Rasmus Wriedt Larsen
977792070a Java: Fix tag missing from getARelevantTag 2022-10-27 09:11:24 +02:00
Rasmus Wriedt Larsen
fc7eb5b4fc InlineExpectationsTest: sync 2022-10-27 09:02:28 +02:00
Tamás Vajk
f1fcb64e94 Merge pull request #10992 from tamasvajk/kotlin-unused-extension
Kotlin: do not report on unused `object` extension parameters
2022-10-27 08:50:33 +02:00
Chris Smowton
28b6e263ec Kotlin: reintroduce pointless wildcards when a Java declaration explicitly uses them
For example, Java code might use `HasOutVariance<? extends String>`, or `HasInVariance<? super Object>`, both of which are needless wildcards and which the Kotlin extractor would previously have refused to reintroduce due to their not specifying a larger type than their bound. However this led to inconsistency with Java extraction, which
extracts the type as it appears in source.

This seems to particularly happen with generated code, e.g. the output of the Kotlin protobuf compiler.
2022-10-26 20:05:27 +01:00
Ian Lynagh
0a470b0864 Kotlin: Handle /!unknown-binary-location/... paths specially on Windows
The standard code wants to normalise it to C:/!unknown-binary-location/...
which is particularly annoying for cross-platform test output.
2022-10-26 19:20:32 +01:00