Kenji Hara <> changed:

           What    |Removed                     |Added
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |

--- Comment #6 from Kenji Hara <> 2012-01-31 22:51:48 PST ---
(In reply to comment #5)
> Further investigation shows that this is not a bug.
>     array.func(arguments)
> is rewritten to be:
>     .func(array, arguments)
> Note the leading ., which means look for func() at module scope. in
> the example is not at module scope, hence it is not found. Note that the error
> message gives the clue in referring to "", not just "bar".
> This was a deliberate design choice, as universal function call syntax is a
> feature meant to be used with global functions, not local ones.

The original bug issue against paired the change is bug 2344. But finding UFCS
property/member function from global scope causes problems like this issue.

And the finding rule is not work against function local import, see bug 6185.

My suggestion is here:

- The UFCS lookup should start *from most inside scope*, not module scope.
- Until reaching to module scope, UFCS lookup should not raise errors against
mismatches of invalid function call, instead *ignore* them silently.
- Finally, if there is no match in all scopes, raise an error.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to