~john-koepi/ubuntu/trusty/golang/default

« back to all changes in this revision

Viewing changes to src/cmd/gofix/testdata/reflect.scan.go.out

  • Committer: Bazaar Package Importer
  • Author(s): Ondřej Surý
  • Date: 2011-08-03 17:04:59 UTC
  • mfrom: (14.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110803170459-wzd99m3567y80ila
Tags: 1:59-1
* Imported Upstream version 59
* Refresh patches to a new release
* Fix FTBFS on ARM (Closes: #634270)
* Update version.bash to work with Debian packaging and not hg
  repository

Show diffs side-by-side

added added

removed removed

Lines of Context:
167
167
// satisfies io.Reader. It will never be called when used as
168
168
// intended, so there is no need to make it actually work.
169
169
func (s *ss) Read(buf []byte) (n int, err os.Error) {
170
 
        return 0, os.ErrorString("ScanState's Read should not be called. Use ReadRune")
 
170
        return 0, os.NewError("ScanState's Read should not be called. Use ReadRune")
171
171
}
172
172
 
173
173
func (s *ss) ReadRune() (rune int, size int, err os.Error) {
240
240
}
241
241
 
242
242
func (s *ss) errorString(err string) {
243
 
        panic(scanError{os.ErrorString(err)})
 
243
        panic(scanError{os.NewError(err)})
244
244
}
245
245
 
246
246
func (s *ss) Token(skipSpace bool, f func(int) bool) (tok []byte, err os.Error) {
426
426
        s.errorString("expected field of type pointer to " + expected + "; found " + reflect.TypeOf(field).String())
427
427
}
428
428
 
429
 
var complexError = os.ErrorString("syntax error scanning complex number")
430
 
var boolError = os.ErrorString("syntax error scanning boolean")
 
429
var complexError = os.NewError("syntax error scanning complex number")
 
430
var boolError = os.NewError("syntax error scanning boolean")
431
431
 
432
432
// consume reads the next rune in the input and reports whether it is in the ok string.
433
433
// If accept is true, it puts the character into the input token.