Skip to content

rename integer literal type and float literal type #556

Closed
@andrewrk

Description

@andrewrk

Right now,

  • @typeName(@typeOf(1)) is "(integer literal)"
  • @typeName(@typeOf(1.0)) is "(float literal)"

I propose that these are renamed to comptime_int and comptime_float respectively. You would be able to refer to the types directly by name.

Also rename

  • @import("builtin").TypeId.FloatLiteral to ComptimeFloat
  • @import("builtin").TypeId.IntLiteral to ComptimeInt
  • @import("builtin").TypeId.UndefinedLiteral to Undefined
  • @import("builtin").TypeId.NullLiteral to Null

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThis proposal is planned.breakingImplementing this issue could cause existing code to no longer compile or have different behavior.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions