mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
Add test with colliding property accessor and function names
This commit is contained in:
committed by
Chris Smowton
parent
857a74cf14
commit
a51c2c496f
@@ -0,0 +1,4 @@
|
||||
| properties.kt:84:13:84:29 | <set-?> | Parameter | -1 | duplicate | -1 |
|
||||
| properties.kt:84:13:84:29 | p | Parameter | -1 | duplicate | -1 |
|
||||
| properties.kt:86:17:86:22 | <set-?> | Parameter | -1 | duplicate | -1 |
|
||||
| properties.kt:86:17:86:22 | p | Parameter | -1 | duplicate | -1 |
|
||||
@@ -0,0 +1 @@
|
||||
| Top which doesn't have exactly 1 toString |
|
||||
@@ -0,0 +1,40 @@
|
||||
[INVALID_KEY] predicate paramName(@param id, string nodeName): The key set {id} does not functionally determine all fields.
|
||||
Here is a pair of tuples that agree on the key set but differ at index 1:
|
||||
Tuple 1 in row 14: (747,"<set-?>")
|
||||
Tuple 2 in row 15: (747,"p")
|
||||
Relevant element: Tuple 1: id=747
|
||||
Full ID for 747: @"params;(746);0". The ID may expand to @"params;{@"callable;{@"class;A"}.setData({@"type;int"}){@"type;void"}"};0"
|
||||
Relevant element: Tuple 2: id=747
|
||||
Full ID for 747: @"params;(746);0". The ID may expand to @"params;{@"callable;{@"class;A"}.setData({@"type;int"}){@"type;void"}"};0"
|
||||
[INVALID_KEY_SET] predicate stmts(@stmt id, int kind, @stmtparent parent, int idx, @callable bodydecl): The key set {parent, idx} does not functionally determine all fields.
|
||||
Here is a pair of tuples that agree on the key set but differ at index 0:
|
||||
Tuple 1 in row 106: (750,0,746,0,746)
|
||||
Tuple 2 in row 108: (762,0,746,0,746)
|
||||
Relevant element: Tuple 1: parent=746
|
||||
Full ID for 746: @"callable;(725).setData((17))(22)". The ID may expand to @"callable;{@"class;A"}.setData({@"type;int"}){@"type;void"}"
|
||||
Relevant element: Tuple 2: parent=746
|
||||
Full ID for 746: @"callable;(725).setData((17))(22)". The ID may expand to @"callable;{@"class;A"}.setData({@"type;int"}){@"type;void"}"
|
||||
Relevant element: Tuple 1: bodydecl=746
|
||||
Full ID for 746: @"callable;(725).setData((17))(22)". The ID may expand to @"callable;{@"class;A"}.setData({@"type;int"}){@"type;void"}"
|
||||
Relevant element: Tuple 2: bodydecl=746
|
||||
Full ID for 746: @"callable;(725).setData((17))(22)". The ID may expand to @"callable;{@"class;A"}.setData({@"type;int"}){@"type;void"}"
|
||||
[INVALID_KEY_SET] predicate exprs(@expr id, int kind, @type typeid, @exprparent parent, int idx): The key set {parent, idx} does not functionally determine all fields.
|
||||
Here is a pair of tuples that agree on the key set but differ at index 0:
|
||||
Tuple 1 in row 303: (749,62,23,746,-1)
|
||||
Tuple 2 in row 310: (761,62,23,746,-1)
|
||||
Relevant element: typeid=23
|
||||
Full ID for 23: @"class;kotlin.Unit"
|
||||
Relevant element: Tuple 1: parent=746
|
||||
Full ID for 746: @"callable;(725).setData((17))(22)". The ID may expand to @"callable;{@"class;A"}.setData({@"type;int"}){@"type;void"}"
|
||||
Relevant element: Tuple 2: parent=746
|
||||
Full ID for 746: @"callable;(725).setData((17))(22)". The ID may expand to @"callable;{@"class;A"}.setData({@"type;int"}){@"type;void"}"
|
||||
[INVALID_KEY_SET] predicate exprs(@expr id, int kind, @type typeid, @exprparent parent, int idx): The key set {parent, idx} does not functionally determine all fields.
|
||||
Here is a pair of tuples that agree on the key set but differ at index 0:
|
||||
Tuple 1 in row 302: (748,62,17,747,-1)
|
||||
Tuple 2 in row 309: (759,62,17,747,-1)
|
||||
Relevant element: typeid=17
|
||||
Full ID for 17: @"type;int"
|
||||
Relevant element: Tuple 1: parent=747
|
||||
Full ID for 747: @"params;(746);0". The ID may expand to @"params;{@"callable;{@"class;A"}.setData({@"type;int"}){@"type;void"}"};0"
|
||||
Relevant element: Tuple 2: parent=747
|
||||
Full ID for 747: @"params;(746);0". The ID may expand to @"params;{@"callable;{@"class;A"}.setData({@"type;int"}){@"type;void"}"};0"
|
||||
@@ -20,6 +20,7 @@ fieldDeclarations
|
||||
| properties.kt:38:5:38:34 | int internalProp; | properties.kt:38:5:38:34 | internalProp | 0 |
|
||||
| properties.kt:67:1:67:23 | int constVal; | properties.kt:67:1:67:23 | constVal | 0 |
|
||||
| properties.kt:70:5:70:16 | int prop; | properties.kt:70:5:70:16 | prop | 0 |
|
||||
| properties.kt:84:5:84:29 | int data; | properties.kt:84:5:84:29 | data | 0 |
|
||||
#select
|
||||
| properties.kt:2:27:2:50 | constructorProp | properties.kt:2:27:2:50 | getConstructorProp | file://:0:0:0:0 | <none> | properties.kt:2:27:2:50 | constructorProp | public |
|
||||
| properties.kt:2:53:2:83 | mutableConstructorProp | properties.kt:2:53:2:83 | getMutableConstructorProp | properties.kt:2:53:2:83 | setMutableConstructorProp | properties.kt:2:53:2:83 | mutableConstructorProp | public |
|
||||
@@ -48,3 +49,5 @@ fieldDeclarations
|
||||
| properties.kt:70:5:70:16 | prop | properties.kt:70:5:70:16 | getProp | file://:0:0:0:0 | <none> | properties.kt:70:5:70:16 | prop | public |
|
||||
| properties.kt:78:1:79:13 | x | properties.kt:79:5:79:13 | getX | file://:0:0:0:0 | <none> | file://:0:0:0:0 | <none> | public |
|
||||
| properties.kt:80:1:81:13 | x | properties.kt:81:5:81:13 | getX | file://:0:0:0:0 | <none> | file://:0:0:0:0 | <none> | public |
|
||||
| properties.kt:84:5:84:29 | data | properties.kt:84:13:84:29 | getData | properties.kt:84:13:84:29 | setData | properties.kt:84:5:84:29 | data | private |
|
||||
| properties.kt:84:5:84:29 | data | properties.kt:84:13:84:29 | getData | properties.kt:86:5:88:5 | setData | properties.kt:84:5:84:29 | data | private |
|
||||
|
||||
@@ -79,3 +79,11 @@ val Int.x : Int
|
||||
get() = 5
|
||||
val Double.x : Int
|
||||
get() = 5
|
||||
|
||||
class A {
|
||||
private var data: Int = 0
|
||||
|
||||
fun setData(p: Int) {
|
||||
data = p
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user