When using an untyped rune in an interface, the default type was blindly untyping it. This fixes this issue. Fixes #1238
23 lines
220 B
Go
23 lines
220 B
Go
package main
|
|
|
|
import "fmt"
|
|
|
|
const majorVersion = '2'
|
|
|
|
type hashed struct {
|
|
major byte
|
|
}
|
|
|
|
func main() {
|
|
fmt.Println(majorVersion)
|
|
|
|
p := new(hashed)
|
|
p.major = majorVersion
|
|
|
|
fmt.Println(p)
|
|
}
|
|
|
|
// Output:
|
|
// 50
|
|
// &{50}
|