Skip to content

Commit 0027db7

Browse files
fix property and accessor locations using PSI
K1 IrProperty.startOffset includes leading modifiers (private, abstract, lateinit, annotations) in the span start; K2 already starts at val/var. Walk the PSI tree from p.startOffset to the enclosing KtProperty, then use valOrVarKeyword.startOffset as the declaration start, giving a consistent start in both K1 and K2. Two related but distinct locations are derived from the KtProperty: - The property itself spans val/var through the end of the full declaration (KtProperty.endOffset), including an explicit getter/setter body on a following line. This is getPsiBasedLocation(IrProperty). - Synthesised accessors (DEFAULT_PROPERTY_ACCESSOR origin) span val/var through the end of the property name (KtProperty.nameIdentifier.endOffset) via getPsiBasedAccessorLocation, applied through accessorOverride(). Explicit getter/setter bodies keep their own independently computed location. This makes K1 accessor locations match K2 and gives each synthesised accessor a precise span, rather than the property's full declaration span. Example (properties.kt line 3, "var modifiableInt = 1"): property modifiableInt -> 3:5:3:25 (val/var .. end of "= 1") accessor getModifiableInt -> 3:5:3:21 (val/var .. end of name) accessor setModifiableInt -> 3:5:3:21 Because accessor locations appear wherever accessors are reported, this refinement updates many expected files (property listings, modifiers, methods, reflection, control-flow and expression dumps). Every change is a location-coordinate change only: no result tuple is added or removed. The PSI-based location is restricted to unspecialised extractions (classTypeArgsIncludingOuterClasses.isNullOrEmpty()). Specialised generic instances (e.g. C<String>.prop) continue to use the binary whole-file location returned by getLocation(p, typeArgs), preserving the existing behaviour that keeps them absent from fromSource() queries. The visibility merge in extractFunction is extended to accept an overriddenAttributes parameter from the caller; the internal fake-override visibility adjustment (DescriptorVisibilities.PUBLIC for Java binary Object methods) is merged with any caller-supplied attributes so that neither overrides the other silently. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 290d0d8 commit 0027db7

28 files changed

Lines changed: 497 additions & 432 deletions

File tree

java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt

Lines changed: 73 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,7 +1748,8 @@ open class KotlinFileExtractor(
17481748
extractMethodAndParameterTypeAccesses: Boolean,
17491749
extractAnnotations: Boolean,
17501750
typeSubstitution: TypeSubstitution?,
1751-
classTypeArgsIncludingOuterClasses: List<IrTypeArgument>?
1751+
classTypeArgsIncludingOuterClasses: List<IrTypeArgument>?,
1752+
overriddenAttributes: OverriddenFunctionAttributes? = null
17521753
) =
17531754
if (isFake(f)) {
17541755
if (needsInterfaceForwarder(f))
@@ -1766,8 +1767,18 @@ open class KotlinFileExtractor(
17661767
// specifically in interfaces loaded from Java classes show up like fake overrides.
17671768
val overriddenVisibility =
17681769
if (f.isFakeOverride && isJavaBinaryObjectMethodRedeclaration(f))
1769-
OverriddenFunctionAttributes(visibility = DescriptorVisibilities.PUBLIC)
1770+
DescriptorVisibilities.PUBLIC
17701771
else null
1772+
// Merge caller-supplied overrides with the internal visibility adjustment.
1773+
val mergedAttributes = when {
1774+
overriddenAttributes == null && overriddenVisibility == null -> null
1775+
overriddenAttributes == null -> OverriddenFunctionAttributes(visibility = overriddenVisibility)
1776+
overriddenVisibility == null -> overriddenAttributes
1777+
else -> overriddenAttributes.copy(
1778+
visibility = overriddenVisibility.takeUnless { overriddenAttributes.visibility != null }
1779+
?: overriddenAttributes.visibility
1780+
)
1781+
}
17711782
forceExtractFunction(
17721783
f,
17731784
parentId,
@@ -1776,7 +1787,7 @@ open class KotlinFileExtractor(
17761787
extractAnnotations,
17771788
typeSubstitution,
17781789
classTypeArgsIncludingOuterClasses,
1779-
overriddenAttributes = overriddenVisibility
1790+
overriddenAttributes = mergedAttributes
17801791
)
17811792
.also {
17821793
// The defaults-forwarder function is a static utility, not a member, so we only
@@ -2659,16 +2670,28 @@ open class KotlinFileExtractor(
26592670

26602671
DeclarationStackAdjuster(p).use {
26612672
val id = useProperty(p, parentId, classTypeArgsIncludingOuterClasses)
2673+
// PSI location is only used for the primary (unspecialised) extraction. Specialised
2674+
// generic instances defer to getLocation so that the backing binary-file location is
2675+
// preserved, keeping specialised properties absent from fromSource() queries.
26622676
val locId =
2663-
if (usesK2) getPsiBasedLocation(p) ?: getLocation(p, classTypeArgsIncludingOuterClasses)
2664-
else getLocation(p, classTypeArgsIncludingOuterClasses)
2677+
if (classTypeArgsIncludingOuterClasses.isNullOrEmpty())
2678+
getPsiBasedLocation(p) ?: getLocation(p, classTypeArgsIncludingOuterClasses)
2679+
else
2680+
getLocation(p, classTypeArgsIncludingOuterClasses)
26652681
tw.writeKtProperties(id, p.name.asString())
26662682
tw.writeHasLocation(id, locId)
26672683

26682684
val bf = p.backingField
26692685
val getter = p.getter
26702686
val setter = p.setter
26712687

2688+
// Synthesised (DEFAULT_PROPERTY_ACCESSOR) getter and setter should point
2689+
// at the property head, not the initialiser or custom accessor body.
2690+
fun accessorOverride(f: IrFunction) =
2691+
if (f.origin == IrDeclarationOrigin.DEFAULT_PROPERTY_ACCESSOR)
2692+
getPsiBasedAccessorLocation(p)?.let { OverriddenFunctionAttributes(sourceLoc = it) }
2693+
else null
2694+
26722695
if (getter == null) {
26732696
if (!isExternalDeclaration(p)) {
26742697
logger.warnElement("IrProperty without a getter", p)
@@ -2682,7 +2705,8 @@ open class KotlinFileExtractor(
26822705
extractMethodAndParameterTypeAccesses = extractFunctionBodies,
26832706
extractAnnotations = extractAnnotations,
26842707
typeSubstitution,
2685-
classTypeArgsIncludingOuterClasses
2708+
classTypeArgsIncludingOuterClasses,
2709+
overriddenAttributes = accessorOverride(getter)
26862710
)
26872711
?.cast<DbMethod>()
26882712
if (getterId != null) {
@@ -2712,7 +2736,8 @@ open class KotlinFileExtractor(
27122736
extractMethodAndParameterTypeAccesses = extractFunctionBodies,
27132737
extractAnnotations = extractAnnotations,
27142738
typeSubstitution,
2715-
classTypeArgsIncludingOuterClasses
2739+
classTypeArgsIncludingOuterClasses,
2740+
overriddenAttributes = accessorOverride(setter)
27162741
)
27172742
?.cast<DbMethod>()
27182743
if (setterId != null) {
@@ -2931,6 +2956,46 @@ open class KotlinFileExtractor(
29312956
return tw.getLocation(declStart, declaration.endOffset)
29322957
}
29332958

2959+
/**
2960+
* Returns the PSI-based location for a property declaration, spanning from
2961+
* the `val`/`var` keyword to the end of the full property declaration (including
2962+
* any explicit getter/setter body).
2963+
*
2964+
* IR offsets are inconsistent across K1 and K2:
2965+
* - K1 [IrProperty.startOffset] includes leading modifiers (private, abstract,
2966+
* lateinit, @Annotation) in the span start. K2 starts at `val`/`var`.
2967+
* - K1 [IrProperty.endOffset] stops at the end of the declaration line and
2968+
* does not include an explicit getter/setter body on a subsequent line. K2
2969+
* includes the getter/setter body.
2970+
*
2971+
* Both are resolved by walking the PSI tree: the [KtProperty] node covers the
2972+
* full declaration including getter/setter, and [KtProperty.valOrVarKeyword]
2973+
* gives the correct start, excluding modifiers.
2974+
*/
2975+
private fun getPsiBasedLocation(p: IrProperty): Label<DbLocation>? {
2976+
if (p.startOffset < 0 || p.endOffset < 0) return null
2977+
val file = currentIrFile ?: return null
2978+
val ktFile = getPsi2Ir()?.getKtFile(file) ?: return null
2979+
val ktProperty = ktFile.findElementAt(p.startOffset)
2980+
?.let { leaf -> generateSequence(leaf) { it.parent }.filterIsInstance<KtProperty>().firstOrNull() }
2981+
?: return null
2982+
val declStart = ktProperty.valOrVarKeyword.startOffset
2983+
val declEnd = ktProperty.endOffset
2984+
return tw.getLocation(declStart, declEnd)
2985+
}
2986+
2987+
private fun getPsiBasedAccessorLocation(p: IrProperty): Label<DbLocation>? {
2988+
if (p.startOffset < 0 || p.endOffset < 0) return null
2989+
val file = currentIrFile ?: return null
2990+
val ktFile = getPsi2Ir()?.getKtFile(file) ?: return null
2991+
val ktProperty = ktFile.findElementAt(p.startOffset)
2992+
?.let { leaf -> generateSequence(leaf) { it.parent }.filterIsInstance<KtProperty>().firstOrNull() }
2993+
?: return null
2994+
val declStart = ktProperty.valOrVarKeyword.startOffset
2995+
val declEnd = ktProperty.nameIdentifier?.endOffset ?: ktProperty.valOrVarKeyword.endOffset
2996+
return tw.getLocation(declStart, declEnd)
2997+
}
2998+
29342999
private fun extractVariable(
29353000
v: IrVariable,
29363001
callable: Label<out DbCallable>,
@@ -2957,7 +3022,7 @@ open class KotlinFileExtractor(
29573022
with("variable expr", v) {
29583023
val varId = useVariable(v)
29593024
val exprId = tw.getFreshIdLabel<DbLocalvariabledeclexpr>()
2960-
val locId = getPsiBasedLocation(v) ?: tw.getLocation(getVariableLocationProvider(v))
3025+
val locId = getPsiBasedLocation(v as IrElement) ?: tw.getLocation(getVariableLocationProvider(v))
29613026
val type = useType(v.type)
29623027
tw.writeLocalvars(varId, v.name.asString(), type.javaResult.id, exprId)
29633028
tw.writeLocalvarsKotlinType(varId, type.kotlinResult.id)

java/ql/test-kotlin1/library-tests/annotation_classes/classes.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ annotations
3232
| def.kt:41:5:41:12 | Annot0k | def.kt:42:5:42:19 | Z | def.kt:5:1:21:60 | Annot0k |
3333
| def.kt:45:1:45:8 | Annot0k | def.kt:46:1:51:1 | fn | def.kt:5:1:21:60 | Annot0k |
3434
| def.kt:46:21:46:28 | Annot0k | def.kt:46:21:46:39 | a | def.kt:5:1:21:60 | Annot0k |
35-
| def.kt:54:1:54:12 | Annot0k | def.kt:57:1:57:23 | getP | def.kt:5:1:21:60 | Annot0k |
36-
| def.kt:55:1:55:12 | Annot0k | def.kt:57:1:57:23 | setP | def.kt:5:1:21:60 | Annot0k |
35+
| def.kt:54:1:54:12 | Annot0k | def.kt:57:1:57:5 | getP | def.kt:5:1:21:60 | Annot0k |
36+
| def.kt:55:1:55:12 | Annot0k | def.kt:57:1:57:5 | setP | def.kt:5:1:21:60 | Annot0k |
3737
| def.kt:56:1:56:14 | Annot0k | def.kt:53:1:57:23 | p | def.kt:5:1:21:60 | Annot0k |
3838
| def.kt:59:5:59:21 | Annot0k | def.kt:59:5:59:28 | <this> | def.kt:5:1:21:60 | Annot0k |
3939
| use.java:10:5:10:21 | Annot0j | use.java:14:18:14:18 | Z | Annot0j.java:1:19:1:25 | Annot0j |
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
| Test.java:2:17:2:17 | m | m | m |
22
| test.kt:4:9:4:18 | getX_prop | getX_prop | getX |
33
| test.kt:6:5:6:19 | getX | getX | getX |
4-
| test.kt:10:5:10:19 | changeY | changeY | setY |
5-
| test.kt:10:5:10:19 | y | y | getY |
4+
| test.kt:10:5:10:9 | changeY | changeY | setY |
5+
| test.kt:10:5:10:9 | y | y | getY |
66
| test.kt:13:5:13:15 | method | method | fn |
77
| test.kt:17:5:17:14 | p | p | p |
88
| test.kt:18:23:18:32 | w | w | q |

java/ql/test-kotlin1/library-tests/classes/genericExprTypes.expected

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
| generic_anonymous.kt:3:3:5:3 | new Object(...) { ... } | new Object(...) { ... } |
1212
| generic_anonymous.kt:3:3:5:3 | this | Generic |
1313
| generic_anonymous.kt:3:3:5:3 | x | new Object(...) { ... } |
14-
| generic_anonymous.kt:3:11:5:3 | T | T |
15-
| generic_anonymous.kt:3:11:5:3 | new Object(...) { ... } | new Object(...) { ... } |
14+
| generic_anonymous.kt:3:11:3:15 | T | T |
15+
| generic_anonymous.kt:3:11:3:15 | new Object(...) { ... } | new Object(...) { ... } |
1616
| generic_anonymous.kt:3:11:5:3 | this.x | new Object(...) { ... } |
1717
| generic_anonymous.kt:3:19:5:3 | <Stmt> | new Object(...) { ... } |
1818
| generic_anonymous.kt:3:19:5:3 | Object | Object |
1919
| generic_anonymous.kt:3:19:5:3 | new (...) | new Object(...) { ... } |
20+
| generic_anonymous.kt:4:7:4:16 | T | T |
2021
| generic_anonymous.kt:4:7:4:20 | ...=... | T |
2122
| generic_anonymous.kt:4:7:4:20 | T | T |
22-
| generic_anonymous.kt:4:7:4:20 | T | T |
2323
| generic_anonymous.kt:4:7:4:20 | member | T |
2424
| generic_anonymous.kt:4:7:4:20 | this | new Object(...) { ... } |
2525
| generic_anonymous.kt:4:7:4:20 | this.member | T |

java/ql/test-kotlin1/library-tests/comments/comments.expected

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ comments
1919
commentOwners
2020
| comments.kt:4:1:11:3 | /**\n * A group of *members*.\n *\n * This class has no useful logic; it's just a documentation example.\n *\n * @property name the name of this group.\n * @constructor Creates an empty group.\n */ | comments.kt:12:1:31:1 | Group |
2121
| comments.kt:14:5:16:7 | /**\n * Members of this group.\n */ | comments.kt:17:5:17:46 | members |
22-
| comments.kt:14:5:16:7 | /**\n * Members of this group.\n */ | comments.kt:17:5:17:46 | members |
23-
| comments.kt:14:5:16:7 | /**\n * Members of this group.\n */ | comments.kt:17:13:17:46 | getMembers$private |
22+
| comments.kt:14:5:16:7 | /**\n * Members of this group.\n */ | comments.kt:17:13:17:23 | getMembers$private |
23+
| comments.kt:14:5:16:7 | /**\n * Members of this group.\n */ | comments.kt:17:13:17:46 | members |
2424
| comments.kt:19:5:22:7 | /**\n * Adds a [member] to this group.\n * @return the new size of the group.\n */ | comments.kt:23:5:26:5 | add |
2525
| comments.kt:35:5:35:34 | /** Medium is in the middle */ | comments.kt:36:5:36:14 | Medium |
2626
| comments.kt:37:5:37:23 | /** This is high */ | comments.kt:38:5:38:11 | High |
2727
| comments.kt:48:1:50:3 | /**\n * A type alias comment\n */ | comments.kt:51:1:51:24 | MyType |
2828
| comments.kt:54:5:56:7 | /**\n * An init block comment\n */ | comments.kt:53:1:58:1 | InitBlock |
2929
| comments.kt:61:5:63:7 | /**\n * A prop comment\n */ | comments.kt:64:5:68:17 | prop |
3030
| comments.kt:65:9:67:11 | /**\n * An accessor comment\n */ | comments.kt:68:9:68:17 | getProp |
31-
| comments.kt:71:9:73:11 | /**\n * An anonymous function comment\n */ | comments.kt:70:5:76:10 | getL |
31+
| comments.kt:71:9:73:11 | /**\n * An anonymous function comment\n */ | comments.kt:70:5:70:9 | getL |
3232
| comments.kt:71:9:73:11 | /**\n * An anonymous function comment\n */ | comments.kt:70:5:76:10 | l |
3333
| comments.kt:71:9:73:11 | /**\n * An anonymous function comment\n */ | comments.kt:70:5:76:10 | l |
3434
| comments.kt:79:9:81:11 | /**\n * A local function comment\n */ | comments.kt:82:9:82:24 | localFn |

java/ql/test-kotlin1/library-tests/controlflow/basic/bbStmts.expected

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,28 @@
1010
| Test.kt:4:2:79:2 | Entry | 0 | Test.kt:4:2:79:2 | Entry |
1111
| Test.kt:4:2:79:2 | Entry | 1 | Test.kt:4:13:79:2 | { ... } |
1212
| Test.kt:4:2:79:2 | Entry | 2 | Test.kt:5:3:5:16 | var ...; |
13-
| Test.kt:4:2:79:2 | Entry | 3 | Test.kt:5:3:5:16 | Before x |
13+
| Test.kt:4:2:79:2 | Entry | 3 | Test.kt:5:7:5:7 | Before x |
1414
| Test.kt:4:2:79:2 | Entry | 4 | Test.kt:5:16:5:16 | 0 |
15-
| Test.kt:4:2:79:2 | Entry | 5 | Test.kt:5:3:5:16 | x |
16-
| Test.kt:4:2:79:2 | Entry | 6 | Test.kt:5:3:5:16 | After x |
15+
| Test.kt:4:2:79:2 | Entry | 5 | Test.kt:5:7:5:7 | x |
16+
| Test.kt:4:2:79:2 | Entry | 6 | Test.kt:5:7:5:7 | After x |
1717
| Test.kt:4:2:79:2 | Entry | 7 | Test.kt:5:3:5:16 | After var ...; |
1818
| Test.kt:4:2:79:2 | Entry | 8 | Test.kt:6:3:6:18 | var ...; |
19-
| Test.kt:4:2:79:2 | Entry | 9 | Test.kt:6:3:6:18 | Before y |
19+
| Test.kt:4:2:79:2 | Entry | 9 | Test.kt:6:7:6:7 | Before y |
2020
| Test.kt:4:2:79:2 | Entry | 10 | Test.kt:6:17:6:18 | 50 |
21-
| Test.kt:4:2:79:2 | Entry | 11 | Test.kt:6:3:6:18 | y |
22-
| Test.kt:4:2:79:2 | Entry | 12 | Test.kt:6:3:6:18 | After y |
21+
| Test.kt:4:2:79:2 | Entry | 11 | Test.kt:6:7:6:7 | y |
22+
| Test.kt:4:2:79:2 | Entry | 12 | Test.kt:6:7:6:7 | After y |
2323
| Test.kt:4:2:79:2 | Entry | 13 | Test.kt:6:3:6:18 | After var ...; |
2424
| Test.kt:4:2:79:2 | Entry | 14 | Test.kt:7:3:7:16 | var ...; |
25-
| Test.kt:4:2:79:2 | Entry | 15 | Test.kt:7:3:7:16 | Before z |
25+
| Test.kt:4:2:79:2 | Entry | 15 | Test.kt:7:7:7:7 | Before z |
2626
| Test.kt:4:2:79:2 | Entry | 16 | Test.kt:7:16:7:16 | 0 |
27-
| Test.kt:4:2:79:2 | Entry | 17 | Test.kt:7:3:7:16 | z |
28-
| Test.kt:4:2:79:2 | Entry | 18 | Test.kt:7:3:7:16 | After z |
27+
| Test.kt:4:2:79:2 | Entry | 17 | Test.kt:7:7:7:7 | z |
28+
| Test.kt:4:2:79:2 | Entry | 18 | Test.kt:7:7:7:7 | After z |
2929
| Test.kt:4:2:79:2 | Entry | 19 | Test.kt:7:3:7:16 | After var ...; |
3030
| Test.kt:4:2:79:2 | Entry | 20 | Test.kt:8:3:8:16 | var ...; |
31-
| Test.kt:4:2:79:2 | Entry | 21 | Test.kt:8:3:8:16 | Before w |
31+
| Test.kt:4:2:79:2 | Entry | 21 | Test.kt:8:7:8:7 | Before w |
3232
| Test.kt:4:2:79:2 | Entry | 22 | Test.kt:8:16:8:16 | 0 |
33-
| Test.kt:4:2:79:2 | Entry | 23 | Test.kt:8:3:8:16 | w |
34-
| Test.kt:4:2:79:2 | Entry | 24 | Test.kt:8:3:8:16 | After w |
33+
| Test.kt:4:2:79:2 | Entry | 23 | Test.kt:8:7:8:7 | w |
34+
| Test.kt:4:2:79:2 | Entry | 24 | Test.kt:8:7:8:7 | After w |
3535
| Test.kt:4:2:79:2 | Entry | 25 | Test.kt:8:3:8:16 | After var ...; |
3636
| Test.kt:4:2:79:2 | Entry | 26 | Test.kt:11:3:16:3 | <Expr>; |
3737
| Test.kt:4:2:79:2 | Entry | 27 | Test.kt:11:3:16:3 | when ... |
@@ -222,15 +222,15 @@
222222
| Test.kt:82:1:89:1 | Entry | 2 | Test.kt:83:2:88:2 | try ... |
223223
| Test.kt:82:1:89:1 | Entry | 3 | Test.kt:83:6:86:2 | { ... } |
224224
| Test.kt:82:1:89:1 | Entry | 4 | Test.kt:84:3:84:18 | var ...; |
225-
| Test.kt:82:1:89:1 | Entry | 5 | Test.kt:84:3:84:18 | Before x |
225+
| Test.kt:82:1:89:1 | Entry | 5 | Test.kt:84:7:84:7 | Before x |
226226
| Test.kt:82:1:89:1 | Entry | 6 | Test.kt:84:11:84:18 | Before (...)... |
227227
| Test.kt:82:1:89:1 | Entry | 7 | Test.kt:84:11:84:11 | o |
228228
| Test.kt:82:1:89:1 | Entry | 8 | Test.kt:84:11:84:18 | (...)... |
229229
| Test.kt:82:1:89:1 | Exit | 0 | Test.kt:82:1:89:1 | Exit |
230230
| Test.kt:82:1:89:1 | Normal Exit | 0 | Test.kt:82:1:89:1 | Normal Exit |
231231
| Test.kt:84:11:84:18 | After (...)... | 0 | Test.kt:84:11:84:18 | After (...)... |
232-
| Test.kt:84:11:84:18 | After (...)... | 1 | Test.kt:84:3:84:18 | x |
233-
| Test.kt:84:11:84:18 | After (...)... | 2 | Test.kt:84:3:84:18 | After x |
232+
| Test.kt:84:11:84:18 | After (...)... | 1 | Test.kt:84:7:84:7 | x |
233+
| Test.kt:84:11:84:18 | After (...)... | 2 | Test.kt:84:7:84:7 | After x |
234234
| Test.kt:84:11:84:18 | After (...)... | 3 | Test.kt:84:3:84:18 | After var ...; |
235235
| Test.kt:84:11:84:18 | After (...)... | 4 | Test.kt:85:3:85:10 | Before return ... |
236236
| Test.kt:84:11:84:18 | After (...)... | 5 | Test.kt:85:10:85:10 | 1 |
@@ -250,15 +250,15 @@
250250
| Test.kt:91:1:98:1 | Entry | 2 | Test.kt:92:2:97:2 | try ... |
251251
| Test.kt:91:1:98:1 | Entry | 3 | Test.kt:92:6:95:2 | { ... } |
252252
| Test.kt:91:1:98:1 | Entry | 4 | Test.kt:93:3:93:13 | var ...; |
253-
| Test.kt:91:1:98:1 | Entry | 5 | Test.kt:93:3:93:13 | Before x |
253+
| Test.kt:91:1:98:1 | Entry | 5 | Test.kt:93:7:93:7 | Before x |
254254
| Test.kt:91:1:98:1 | Entry | 6 | Test.kt:93:11:93:13 | Before ...!! |
255255
| Test.kt:91:1:98:1 | Entry | 7 | Test.kt:93:11:93:11 | o |
256256
| Test.kt:91:1:98:1 | Entry | 8 | Test.kt:93:11:93:13 | ...!! |
257257
| Test.kt:91:1:98:1 | Exit | 0 | Test.kt:91:1:98:1 | Exit |
258258
| Test.kt:91:1:98:1 | Normal Exit | 0 | Test.kt:91:1:98:1 | Normal Exit |
259259
| Test.kt:93:11:93:13 | After ...!! | 0 | Test.kt:93:11:93:13 | After ...!! |
260-
| Test.kt:93:11:93:13 | After ...!! | 1 | Test.kt:93:3:93:13 | x |
261-
| Test.kt:93:11:93:13 | After ...!! | 2 | Test.kt:93:3:93:13 | After x |
260+
| Test.kt:93:11:93:13 | After ...!! | 1 | Test.kt:93:7:93:7 | x |
261+
| Test.kt:93:11:93:13 | After ...!! | 2 | Test.kt:93:7:93:7 | After x |
262262
| Test.kt:93:11:93:13 | After ...!! | 3 | Test.kt:93:3:93:13 | After var ...; |
263263
| Test.kt:93:11:93:13 | After ...!! | 4 | Test.kt:94:3:94:10 | Before return ... |
264264
| Test.kt:93:11:93:13 | After ...!! | 5 | Test.kt:94:10:94:10 | 1 |

java/ql/test-kotlin1/library-tests/controlflow/basic/bbStrictDominance.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@
3030
| Test.kt:82:21:89:1 | { ... } | Test.kt:82:1:89:1 | Exceptional Exit |
3131
| Test.kt:82:21:89:1 | { ... } | Test.kt:82:1:89:1 | Exit |
3232
| Test.kt:82:21:89:1 | { ... } | Test.kt:82:1:89:1 | Normal Exit |
33-
| Test.kt:82:21:89:1 | { ... } | Test.kt:84:3:84:18 | x |
33+
| Test.kt:82:21:89:1 | { ... } | Test.kt:84:7:84:7 | x |
3434
| Test.kt:82:21:89:1 | { ... } | Test.kt:86:4:88:2 | catch (...) |
3535
| Test.kt:82:21:89:1 | { ... } | Test.kt:86:34:88:2 | { ... } |
3636
| Test.kt:86:4:88:2 | catch (...) | Test.kt:82:1:89:1 | Exceptional Exit |
3737
| Test.kt:86:4:88:2 | catch (...) | Test.kt:86:34:88:2 | { ... } |
3838
| Test.kt:91:22:98:1 | { ... } | Test.kt:91:1:98:1 | Exceptional Exit |
3939
| Test.kt:91:22:98:1 | { ... } | Test.kt:91:1:98:1 | Exit |
4040
| Test.kt:91:22:98:1 | { ... } | Test.kt:91:1:98:1 | Normal Exit |
41-
| Test.kt:91:22:98:1 | { ... } | Test.kt:93:3:93:13 | x |
41+
| Test.kt:91:22:98:1 | { ... } | Test.kt:93:7:93:7 | x |
4242
| Test.kt:91:22:98:1 | { ... } | Test.kt:95:4:97:2 | catch (...) |
4343
| Test.kt:91:22:98:1 | { ... } | Test.kt:95:36:97:2 | { ... } |
4444
| Test.kt:95:4:97:2 | catch (...) | Test.kt:91:1:98:1 | Exceptional Exit |

0 commit comments

Comments
 (0)