reject_untyped_const_overflow.mx raw

   1  // expected: overflows int32
   2  //
   3  // Moxie's int is 32 bits on every target, so an untyped constant that does not
   4  // fit int32 is an error where its default type applies - an interface argument
   5  // here. stage4 truncated it to the low 32 bits instead: the argument printed
   6  // 1, and `math.MaxUint64 / 10` printed its low half. go/types reports
   7  // "cannot use ... as int value in argument to fmt.Println (overflows)".
   8  package main
   9  
  10  import "fmt"
  11  
  12  func main() {
  13  	fmt.Println(0 - 9223372036854775807)
  14  }
  15