Disallow ! in module function calls.

This commit is contained in:
Stephen Chung
2020-10-12 16:59:59 +08:00
parent e343bcfa8f
commit c4f00afbee
2 changed files with 17 additions and 1 deletions

View File

@@ -43,6 +43,12 @@ let f = Fn("foo");
call!(f, 41) == 42; // must use function-call style
f.call!(41); // <- syntax error: capturing is not allowed in method-call style
// Capturing is not available for module functions
import "hello" as h;
h::greet!(); // <- syntax error: capturing is not allowed in namespace-qualified calls
```