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

Cannot use byte as const name #23236

Closed
gechandesu opened this issue Dec 22, 2024 · 2 comments
Closed

Cannot use byte as const name #23236

gechandesu opened this issue Dec 22, 2024 · 2 comments
Assignees
Labels
Bug This tag is applied to issues which reports bugs. Status: Confirmed This bug has been confirmed to be valid by a contributor. Unit: Compiler Bugs/feature requests, that are related to the V compiler in general.

Comments

@gechandesu
Copy link
Contributor

gechandesu commented Dec 22, 2024

Describe the bug

Subject. byte type is deprecated since V 0.3.5 (29 June 2023)

Reproduction Steps

module main

pub type DataUnit = f64

pub const bit = DataUnit(1)
pub const byte = bit * 8

Expected Behavior

Successful compilation.

Current Behavior

code.v:6:11: error: invalid use of reserved type `byte` as a const name
    4 | 
    5 | pub const bit = DataUnit(1)
    6 | pub const byte = bit * 8
      |           ~~~~~~~~~~~~~~

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.4.8 76e17bd

Environment details (OS name and version, etc.)

Not important.

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.

Huly®: V_0.6-21670

@gechandesu gechandesu added the Bug This tag is applied to issues which reports bugs. label Dec 22, 2024
@kbkpbot
Copy link
Contributor

kbkpbot commented Dec 22, 2024

So , we need to replace all byte with u8 in all v/vlib...

@Delta456 Delta456 self-assigned this Dec 22, 2024
@Delta456
Copy link
Member

We need to change the warning to error replace all byte with u8 and remove it entirely.

@felipensp felipensp added Unit: Compiler Bugs/feature requests, that are related to the V compiler in general. Status: Confirmed This bug has been confirmed to be valid by a contributor. labels Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs. Status: Confirmed This bug has been confirmed to be valid by a contributor. Unit: Compiler Bugs/feature requests, that are related to the V compiler in general.
Projects
None yet
Development

No branches or pull requests

4 participants