Skip to content

int <-> u8 promotions #25936

@tankf33der

Description

@tankf33der

Why type of a and b and values of them are not the same???
I'm expecting int and 420.

fn main() {
	a := 300 + u8(120)
	println(typeof(a).name)
	b := int(300) + u8(120)
	println(typeof(b).name)
}

Please review this issue and fix if necessary.

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Unit: Type SystemBugs/feature requests, that are related to the V types system.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions