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
Otherwise, we override the code/location again.
  • Loading branch information
oxisto committed Oct 7, 2024
1 parent bd596ed commit f08aa3e
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 f08aa3e

Please # to comment.