Given the following code, astroid will crash with a RuntimeError. The problem occurs because k is not inferred as the argument, but as the iterating element from the comprehension, which makes dict(**k) to be reevaluated at each inference step. This might be solved when we'll rewrite the lookup mechanism, since right now it's scattered all over the place.
#!python
from astroid.test_utils import extract_node
n = extract_node('''
def test(k):
(k for k in __(dict(**k)))
''')
print(next(n.infer()))
Originally reported by: Claudiu Popa (BitBucket: PCManticore, GitHub: PCManticore)
Given the following code, astroid will crash with a RuntimeError. The problem occurs because k is not inferred as the argument, but as the iterating element from the comprehension, which makes dict(**k) to be reevaluated at each inference step. This might be solved when we'll rewrite the lookup mechanism, since right now it's scattered all over the place.