• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

abs-lang / abs / 1414
76%
master: 63%

Build:
Build:
LAST BUILD BRANCH: 2.8.x
DEFAULT BRANCH: master
Ran 13 May 2020 09:41PM UTC
Jobs 3
Files 9
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 May 2020 09:37PM UTC coverage: 75.577% (+0.07%) from 75.509%
1414

push

travis-ci-com

odino
Default values for function parameters, closes #368

This PR adds the ability to specify default values for function
arguments.

Optional parameters need to come right after mandatory ones:

```
⧐  f test(x = 1, y){}
 parser errors:
	found mandatory parameter after optional one
	[1:15]	f test(x = 1, y){}
```

and they can use any kind of expression:

```
⧐  f test(x = 1){ x }; test()
1
⧐  f test(x = []){ x }; test()
[]
⧐  f test(x = {}){ x }; test()
{}
⧐  f test(x = 1..10){ x }; test()
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
```

If a mandatory argument is not passed, ABS will now give you a more
detailed message:

```
⧐  f test(x){ x }; test()
ERROR: argument x to function f test(x) {x} is missing, and doesn't have a default value
	[1:1]	f test(x){ x }; test()
```

64 of 64 new or added lines in 3 files covered. (100.0%)

3602 of 4766 relevant lines covered (75.58%)

244.22 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1414.1 (GO111MODULE=on CONTEXT=abs) 13 May 2020 09:42PM UTC 0
74.63
Travis Job 1414.1
2 1414.2 (GO111MODULE=on CONTEXT=abs) 13 May 2020 09:41PM UTC 0
75.54
Travis Job 1414.2
3 1414.3 (GO111MODULE=on CONTEXT=abs) 13 May 2020 09:43PM UTC 0
75.54
Travis Job 1414.3
Source Files on build 1414
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #1414
  • f0bb2722 on github
  • Prev Build on default-args-for-functions (#1410)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc