mirror of https://github.com/golang/go.git
parent
27d95f1372
commit
e285ed6090
|
|
@ -6,30 +6,37 @@
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
func main() {
|
func main() int {
|
||||||
[]int(
|
var i uint64 =
|
||||||
' ',
|
' ' +
|
||||||
'a',
|
'a' +
|
||||||
'ä',
|
'ä' +
|
||||||
'本',
|
'本' +
|
||||||
'\a',
|
'\a' +
|
||||||
'\b',
|
'\b' +
|
||||||
'\f',
|
'\f' +
|
||||||
'\n',
|
'\n' +
|
||||||
'\r',
|
'\r' +
|
||||||
'\t',
|
'\t' +
|
||||||
'\v',
|
'\v' +
|
||||||
'\\',
|
'\\' +
|
||||||
'\'',
|
'\'' +
|
||||||
'\"',
|
'\000' +
|
||||||
'\000',
|
'\123' +
|
||||||
'\123',
|
'\x00' +
|
||||||
'\x00',
|
'\xca' +
|
||||||
'\xca',
|
'\xFE' +
|
||||||
'\xFE',
|
'\u0123' +
|
||||||
'\u0123',
|
'\ubabe' +
|
||||||
'\ubabe',
|
'\U0123ABCD' +
|
||||||
'\U0123ABCD',
|
|
||||||
'\Ucafebabe'
|
'\Ucafebabe'
|
||||||
);
|
;
|
||||||
|
if '\Ucafebabe' != 0xcafebabe {
|
||||||
|
print "cafebabe wrong\n";
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if i != 0xcc238de1 {
|
||||||
|
print "number is ", i, " should be ", 0xcc238de1, "\n";
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
|
|
||||||
=========== ./char_lit.go
|
=========== ./char_lit.go
|
||||||
char_lit.go:5: syntax error
|
|
||||||
char_lit.go:17: unknown escape sequence: \
|
|
||||||
char_lit.go:19: unknown escape sequence: "
|
|
||||||
BUG: known to fail incorrectly
|
|
||||||
|
|
||||||
=========== ./float_lit.go
|
=========== ./float_lit.go
|
||||||
float_lit.go:5: syntax error
|
float_lit.go:5: syntax error
|
||||||
|
|
@ -39,8 +35,6 @@ hello, world
|
||||||
BUG: known to succeed incorrectly
|
BUG: known to succeed incorrectly
|
||||||
|
|
||||||
=========== ./int_lit.go
|
=========== ./int_lit.go
|
||||||
int_lit.go:5: syntax error
|
|
||||||
BUG: known to fail incorrectly
|
|
||||||
|
|
||||||
=========== ./iota.go
|
=========== ./iota.go
|
||||||
|
|
||||||
|
|
@ -205,10 +199,6 @@ BUG: known to fail incorrectly
|
||||||
bugs/bug023.go:20: fatal error: naddr: const <Type>I{<TypeName>110(<_t117>{},<_o119>{},{});}
|
bugs/bug023.go:20: fatal error: naddr: const <Type>I{<TypeName>110(<_t117>{},<_o119>{},{});}
|
||||||
BUG: known to fail incorrectly
|
BUG: known to fail incorrectly
|
||||||
|
|
||||||
=========== bugs/bug024.go
|
|
||||||
bugs/bug024.go:8: unknown escape sequence: \
|
|
||||||
BUG: erroneous errors but compiles anyway
|
|
||||||
|
|
||||||
=========== bugs/bug025.go
|
=========== bugs/bug025.go
|
||||||
bugs/bug025.go:7: fatal error: dumpexportvar: oname nil: Foo
|
bugs/bug025.go:7: fatal error: dumpexportvar: oname nil: Foo
|
||||||
|
|
||||||
|
|
@ -301,4 +291,6 @@ fixedbugs/bug007.go:7: addtyp: renaming Point/<Point>{<x><float32>FLOAT32;<y><fl
|
||||||
|
|
||||||
=========== fixedbugs/bug021.go
|
=========== fixedbugs/bug021.go
|
||||||
|
|
||||||
|
=========== fixedbugs/bug024.go
|
||||||
|
|
||||||
=========== fixedbugs/bug031.go
|
=========== fixedbugs/bug031.go
|
||||||
|
|
|
||||||
|
|
@ -6,15 +6,18 @@
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
func main() {
|
func main() int {
|
||||||
[]int(
|
s :=
|
||||||
0,
|
0 +
|
||||||
123,
|
123 +
|
||||||
0123,
|
0123 +
|
||||||
0000,
|
0000 +
|
||||||
0x0,
|
0x0 +
|
||||||
0x123,
|
0x123 +
|
||||||
0X0,
|
0X0 +
|
||||||
0X123
|
0X123;
|
||||||
);
|
if s != 788 {
|
||||||
|
print "s is ", s, "; should be 788\n";
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue