Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

const inst = $instance_type($f) in macros #23

Merged
merged 2 commits into from
May 30, 2021
Merged

Conversation

cscherrer
Copy link
Owner

@cscherrer cscherrer commented May 29, 2021

I was seeing some strange behavior in MeasureTheory, and I think it was coming from macros containing functions defined on

::$instance_type($f)

This PR changes that. First we define

const inst = $instance_type($f)

then the argument can just be

::inst

We can use the same inst in each case, because macro hygiene will force this to be implemented as a different name each time.

@codecov
Copy link

codecov bot commented May 29, 2021

Codecov Report

Merging #23 (498e16d) into master (7eb3f56) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #23   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           65        67    +2     
=========================================
+ Hits            65        67    +2     
Impacted Files Coverage Δ
src/KeywordCalls.jl 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7eb3f56...498e16d. Read the comment docs.

Copy link
Collaborator

@mileslucas mileslucas left a comment

Choose a reason for hiding this comment

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

lgtm

@cscherrer cscherrer merged commit d77cfd0 into master May 30, 2021
@cscherrer cscherrer deleted the cs-instance-type branch May 30, 2021 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants