Oldest version known to work = Go 1.8, closes #177

It seems like it was broken on older compilers
since pregenerated stdlib AST.

It adds go 1.8.x to travis, so that we have a chance
of catching when our "known to work" no longer holds.
This commit is contained in:
Stanisław Barzowski 2018-01-16 09:39:25 +01:00 committed by Dave Cunningham
parent d135effbe4
commit d6623a98cb
3 changed files with 10 additions and 2 deletions

View File

@ -2,6 +2,7 @@ language: go
sudo: false sudo: false
go: go:
- 1.x - 1.x
- 1.8.x
- tip - tip
before_install: before_install:
- go get github.com/axw/gocov/gocov - go get github.com/axw/gocov/gocov

View File

@ -14,7 +14,7 @@ feature complete but is not as heavily exercised as the [Jsonnet C++
implementation](https://github.com/google/jsonnet). Please try it out and give implementation](https://github.com/google/jsonnet). Please try it out and give
feedback. feedback.
This code is known to work on Go 1.6 and above. This code is known to work on Go 1.8 and above. We recommend always using the newest stable release of Go.
## Build instructions ## Build instructions

View File

@ -549,7 +549,14 @@ var builtinAsin = liftNumeric(math.Asin)
var builtinAcos = liftNumeric(math.Acos) var builtinAcos = liftNumeric(math.Acos)
var builtinAtan = liftNumeric(math.Atan) var builtinAtan = liftNumeric(math.Atan)
var builtinLog = liftNumeric(math.Log) var builtinLog = liftNumeric(math.Log)
var builtinExp = liftNumeric(math.Exp) var builtinExp = liftNumeric(func(f float64) float64 {
res := math.Exp(f)
if res == 0 && f > 0 {
return math.Inf(1)
} else {
return res
}
})
var builtinMantissa = liftNumeric(func(f float64) float64 { var builtinMantissa = liftNumeric(func(f float64) float64 {
mantissa, _ := math.Frexp(f) mantissa, _ := math.Frexp(f)
return mantissa return mantissa