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

makeStackItem() could not parse trigger type #776

Closed
alexvanin opened this issue Mar 18, 2020 · 1 comment · Fixed by #780
Closed

makeStackItem() could not parse trigger type #776

alexvanin opened this issue Mar 18, 2020 · 1 comment · Fixed by #780
Assignees
Labels
question Further information is requested
Milestone

Comments

@alexvanin
Copy link
Contributor

alexvanin commented Mar 18, 2020

In 7d46404 trigger constants were defined with the type Type, which is a byte alias. However makeStackItem() can't explicitly convert Type as uint8

func makeStackItem(v interface{}) StackItem {
	switch val := v.(type) {
	case int:
	case int64:
	case uint8:
	case uint16:
	case uint32:
	case uint64:
	case []byte:
	case string:
	case bool:
	case []StackItem:
	case *big.Int:
	case StackItem:
	case []int:
	default:
	}
}

Therefore code snippets like this lead to an error.

v.Estack().PushVal(trigger.Application)

Is it correct behaviour?

@roman-khimov roman-khimov added this to the v0.74.1 milestone Mar 18, 2020
@roman-khimov
Copy link
Member

Kinda at the moment, but it's a useful use case and it's so easy to fix that we should do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants