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

Closure inliner not handling keyword args correctly #5000

Open
2 tasks done
stuartarchibald opened this issue Dec 21, 2019 · 0 comments
Open
2 tasks done

Closure inliner not handling keyword args correctly #5000

stuartarchibald opened this issue Dec 21, 2019 · 0 comments
Labels
bug - miscompile Bugs: miscompile

Comments

@stuartarchibald
Copy link
Contributor

Reporting a bug

This:

from numba import njit
import numpy as np

@njit
def pennsylvania6():

    def foo(a, b, kw1=False):
        print(a, b, kw1)

    foo(1, 2, "x")
    foo(1, 2, kw1="y")
    foo(1, 2, kw1=True)


pennsylvania6()
print('-' * 80)
pennsylvania6.py_func()

produces:

1 2 x                                                                                                                           
1 2 False                                                                                                                       
1 2 False                                                                                                                       
--------------------------------------------------------------------------------                                                
1 2 x                                                                                                                           
1 2 y                                                                                                                           
1 2 True                                                                                                                        

suspect there's something wrong with the inliner/a missing guard against this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug - miscompile Bugs: miscompile
Projects
None yet
Development

No branches or pull requests

1 participant