News for hackers. Stuff that matters.
Re:Your test suite is trying to tell you something by dragonwriter on Thursday July 04, 2013 @01:42PM (#5991661)
To illustrate this point, this code:

  package main

  import ( 
        "time"
	"fmt"
  )
  
  func ident(x int64) int64 {
      return x
  }

  func main() {
      t := time.Duration(1)
      v := math.Inf(t)
  }
produces the error:

  cannot use t (type time.Duration) as type int64 in function argument
The issue is with Go's arithmetic operators subverting the type system more than with the type system itself.

There are no comments on this comment yet.