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

compiler/checker: error message differs from gc when involving builtin 'append' #808

Open
zapateo opened this issue Aug 12, 2021 · 1 comment
Assignees
Labels
needsInvestigation Need to investigate non-gc-compliant Non compliant with Go command

Comments

@zapateo
Copy link
Member

zapateo commented Aug 12, 2021

Source code

package main

func main() {
	type String string
	t := []byte{}
	_ = t
	s := String("ciao")
	_ = s
	_ = 2 + append(t, s...)
}

Expected error (returned by gc)

invalid operation: 2 + append(t, s...) (mismatched types int and []byte)

Error returned by Scriggo

invalid operation: 2 + append(t, s...) (cannot convert 2 (type untyped int) to type []uint8)
@zapateo zapateo added needsInvestigation Need to investigate non-gc-compliant Non compliant with Go command labels Aug 12, 2021
@gazerro
Copy link
Member

gazerro commented Sep 12, 2021

This is a duplicate of #385.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needsInvestigation Need to investigate non-gc-compliant Non compliant with Go command
Projects
None yet
Development

No branches or pull requests

2 participants