gjaldon / ecto_enum

Ecto extension to support enums in models
MIT License
562 stars 131 forks source link

fix warning the underscored variable #120

Closed cristopher-rodrigues closed 1 year ago

cristopher-rodrigues commented 1 year ago

fixes:

warning: the underscored variable "_t" is used after being set. A leading underscore indicates that the value of the variable should be ignored. If this is intended please rename the variable to remove the underscore
bernardd commented 1 year ago

@cristopher-rodrigues Thanks for the fix - just hit this today myself - I assume it's something to do with the latest version of Elixir, but I'm struggling to figure out why it's generating the warning. Do you understand it?

bernardd commented 1 year ago

Looks like this was a bug that's been fixed in Elixir 1.14.3. At least, the changelog has this entry:

[Kernel] Do not warn on captured underscored vars from defmodule

And it's fixed it for me.

gjaldon commented 1 year ago

@cristopher-rodrigues @bernardd I was told by jose valim that this was a regression in Elixir and not an issue in this project. Thanks for the update that it's now fixed in Elixir 1.14.3 @bernardd ! Closing the issue now. Thanks anyway @cristopher-rodrigues :)