reject_append_builtin.mx raw

   1  // expected: undefined: append
   2  //
   3  // append is not a builtin in Moxie in any spelling. push, pop and resize are
   4  // the slice mutators, and the compiler keeps no append lowering at all - the
   5  // internal __moxie_append alias that used to survive for the compiler's own
   6  // packages is gone too (pinned by reject_internal_append.mx). The name has to
   7  // be undefined rather than a special error so that a user may declare its own
   8  // `append`.
   9  package main
  10  
  11  func main() {
  12  	xs := []byte{:1}
  13  	_ = append(xs, 'a')
  14  }
  15