Gianluca Mondini
Gianluca Mondini
```go package main import "crypto/sha1" func main() { h := sha1.New() sb := []byte("abc") h.Write(sb) } ``` reports the error `value of type *sha1.digest is not assignable to type []uint8`
```go package main import "fmt" func main() { b := new([5]int) for i := 0; i < 5; i++ { b[i] = i } fmt.Println(b) } ```
```go package main import "fmt" func main() { s := make([]int, 10) var i int for i, s[i] = range []int{1, 2, 3, 4} { fmt.Print(i, ",") fmt.Print(s[i], " -...
The following code: ```go package main func main() { a := [2]int{} for a[0] = range []int{1, 2, 3} { } } ``` panics the compiler.
Consider this code: ```go package main func main() { var f1 func() var f2 func() f1 == f2 } ``` Scriggo prints the error: ``` invalid operation: f1 == f2...
## Source code ```go package main type S struct { F int } var V = S{ F: 1, } var F = V.F func main() {} ``` ## Expected...
## Source code ```go package main func f(x f) {} func main() {} ``` ## Expected error message This is the error message returned by gc: ``` f is not...
```go package main import "fmt" var v [2]int const c = len(v) func main() { fmt.Print("array has length ", c) } ``` The loop occurs in function `sortDeclarations`. Note that...
```go package main type A = struct { B *B } type B struct { A *A } func main() {} ``` should be valid but returns error: ```go scriggo:...
```go package main type T *T func main() {} ``` should be valid but Scriggo returns `invalid recursive type alias type T *T`