Skip to content

Commit

Permalink
[kotlin2cpg] Add currently failing test case for named arguments. (#5043
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ml86 authored Oct 31, 2024
1 parent 023fcdb commit 6c169a1
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,20 @@ class CallTests extends KotlinCode2CpgFixture(withOssDataflow = false) {
}
}

"CPG for code with named arguments in call on object" should {
val cpg = code("""
|package no.such.pkg
|fun outer() {
| Pair(1,2).copy(second = 3)
|}
|""".stripMargin)

"contain a CALL node with arguments that have the argument name set" ignore {
val List(c) = cpg.call.name("copy").l
c.argument(1).argumentName shouldBe Some("second")
}
}

"CPG for code with call with argument with type with upper bound" should {
val cpg = code("""
|package mypkg
Expand Down

0 comments on commit 6c169a1

Please sign in to comment.