Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

const rune bad convert type to int #661

Closed
visualfc opened this issue Jan 23, 2021 · 0 comments · Fixed by #658
Closed

const rune bad convert type to int #661

visualfc opened this issue Jan 23, 2021 · 0 comments · Fixed by #658
Labels

Comments

@visualfc
Copy link
Member

Go+ code

a := 'a'
printf("%T\n",a)
printf("%T\n",'a')

int32
int // bad type

generte Golang code

package main

import fmt "fmt"

var a int32

func main() { 
//line ./main.gop:2
	a = int32(97)
//line ./main.gop:3
	fmt.Printf("%T\n", a)
//line ./main.gop:4
	fmt.Printf("%T\n", 97)
}
visualfc added a commit to visualfc/gop that referenced this issue Jan 23, 2021
@xushiwei xushiwei added the bug label Mar 4, 2021
xushiwei added a commit that referenced this issue Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants