Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sjsonnet does not reject invalid arguments being passed to a function #5

Closed
lihaoyi-databricks opened this issue Feb 20, 2019 · 0 comments

Comments

@lihaoyi-databricks
Copy link
Contributor

lihaoyi-databricks commented Feb 20, 2019

The following snippet fails with google/jsonnet, passes with sjsonnet:

lihaoyi ~$ cat foo.jsonnet
// A function that returns an object.
local Person(name='Alice') = {
  name: name,
  welcome: 'Hello ' + name + '!',
};
{
  person2: Person('Bob', hello=123),
}
lihaoyi ~$ ./sjsonnet.jar foo.jsonnet
{
   "person2": {
      "name": "Bob",
      "welcome": "Hello Bob!"
   }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant