reject_clear_non_slice.mx raw

   1  // expected: unsupported type in clear builtin
   2  package main
   3  
   4  // The argument must be non-constant: `x := int32(1)` folds to a constant and
   5  // that call never reaches the builtin emitter at all (a separate, older hole).
   6  func f(n int32) {
   7  	clear(n)
   8  }
   9  
  10  func main() {
  11  	f(1)
  12  }
  13