golang: Make @func to be idempotent
i.e. make double call of func(func(f)) to return exactly the same as func(f). This is correct to do as the first func call already returns a wrapper that setups additional frame for defer. The second func call, if doing the same, will wrap the thing just one more time and there will be two frames for defer, but defer needs only one to work correctly. So far we had no case when such double func calls would appear in practice, because @func @func def f(): ... would immediately catch attention. However in the next patch we will have this case to appear internally when handling properties. So it is better to make sure beforehand no waste of resources will happen. /reviewed-by @levin.zimmermann /reviewed-on !31
Showing
Please register or sign in to comment