Skip to content

Commit

Permalink
Merge pull request #26 from cscherrer/cs-avoid-inst-redefinition
Browse files Browse the repository at this point in the history
@gensym inst
  • Loading branch information
cscherrer authored Jun 28, 2021
2 parents 15518be + 6b4b1c0 commit d7cfa51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "KeywordCalls"
uuid = "4d827475-d3e4-43d6-abe3-9688362ede9f"
authors = ["Chad Scherrer <[email protected]> and contributors"]
version = "0.2.0"
version = "0.2.1"

[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
Expand Down
5 changes: 3 additions & 2 deletions src/KeywordCalls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,10 @@ function _kwalias(f, aliasmap)
@assert pair.args[1] == :(=>)
(a,b) = QuoteNode.(pair.args[2:3])

@gensym inst
newmethod = quote
const inst = $instance_type($f)
KeywordCalls.alias(::inst, ::Val{$a}) = $b
const $inst = $instance_type($f)
KeywordCalls.alias(::$inst, ::Val{$a}) = $b
end

push!(q.args, newmethod)
Expand Down

2 comments on commit d7cfa51

@cscherrer
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/39801

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.1 -m "<description of version>" d7cfa5153cc165595f9dc9e25aba42c76b03acb1
git push origin v0.2.1

Please sign in to comment.