Skip to content

Commit

Permalink
implicit() only triggers code/location update now if its not empty (#…
Browse files Browse the repository at this point in the history
…1784)

Otherwise, we override the code/location again.
  • Loading branch information
oxisto authored Oct 7, 2024
1 parent 8dad7d1 commit 467013f
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,12 @@ interface RawNodeTypeProvider<T> : MetadataProvider
* This also sets [Node.isImplicit] to true.
*/
fun <T : Node> T.implicit(code: String? = null, location: PhysicalLocation? = null): T {
this.code = code
this.location = location
if (code != null) {
this.code = code
}
if (location != null) {
this.location = location
}
this.isImplicit = true

return this
Expand Down

0 comments on commit 467013f

Please sign in to comment.