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

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

Build:
Build:
LAST BUILD BRANCH: 2.8.x
DEFAULT BRANCH: master
Ran 13 May 2020 09:37PM UTC
Jobs 2
Files 9
Run time 55s
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:36PM UTC coverage: 75.509% (-0.04%) from 75.551%
1410

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%)

3595 of 4761 relevant lines covered (75.51%)

162.68 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1410.1 (GO111MODULE=on CONTEXT=abs) 13 May 2020 09:38PM UTC 0
74.61
Travis Job 1410.1
2 1410.2 (GO111MODULE=on CONTEXT=abs) 13 May 2020 09:37PM UTC 0
75.51
Travis Job 1410.2
Source Files on build 1410
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #1410
  • 06f00ca6 on github
  • Prev Build on default-args-for-functions (#1409)
  • Next Build on default-args-for-functions (#1414)
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