Skip to content
This repository has been archived by the owner on Oct 14, 2021. It is now read-only.

accept print with no arguments #55

Closed
josharian opened this issue Jan 22, 2019 · 0 comments · Fixed by #70
Closed

accept print with no arguments #55

josharian opened this issue Jan 22, 2019 · 0 comments · Fixed by #70

Comments

@josharian
Copy link

$ starlark-go -c 'print()'

(exit 0)

$ starlark-rust -c 'print()'
error[CF00]: Missing parameter msg for call to <native function print>(msg)
 --> [command flag]:1:1
  |
1 | print()
  | ^^^^^^^ Not enough parameters in function call

(exit 2)
damienmg pushed a commit that referenced this issue Apr 29, 2019
Fixes #55

Test:

```
% cargo run -- --repl
    Finished dev [unoptimized + debuginfo] target(s) in 0.20s
     Running `/Users/nga/devel/left/starlark-rust/target/debug/starlark-repl --repl`
Welcome to Starlark REPL, press Ctrl+D to exit.
>>> print("a")
a
>>> print(1, True, [])
1 True []
>>> print()

>>>
```

Using Go Starlark:

```
% starlark
Welcome to Starlark (go.starlark.net)
>>> print("a")
a
>>> print(1, True, [])
1 True []
>>> print()

>>>
```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant