The previous code didn't look at __enter__(), and assumed that all context-managers returned their own type.
We also didn't account for targets other than simple names, e.g. with Mgr() as (foo, bar):
Thanks to Nicolás Alvarez.
brauch | |
nalvarez |
The previous code didn't look at __enter__(), and assumed that all context-managers returned their own type.
We also didn't account for targets other than simple names, e.g. with Mgr() as (foo, bar):
Thanks to Nicolás Alvarez.
Seems to work. I'll add some duchaintests before pushing.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Otherwise looks good! If you feel super ambitious you could add a test, should be very simple ;)
duchain/declarationbuilder.cpp | ||
---|---|---|
376 | Please check whether the type assigned to this function is indeed a FunctionType, yes it should be, but it happens sometimes that other code screws this up and then this will crash |