GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — type casting between u16 and i32 needed · Issue #2170 · lcompilers/lpython

type casting between u16 and i32 needed #2170

New issue
Copy link
New issue
Copy link
Closed
#2171
Closed
type casting between u16 and i32 needed#2170
#2171
Copy link
Labels
BLOCKERworkaround not found yetworkaround not found yet

Description

@rebcabin
rebcabin
opened on Jul 17, 2023
Issue body actions

we expected to be able to convert 32768, which is i32, into u16. please help

from lpython import u16, i32

i : i32
u : u16 = u16(32768)
x : i32

for i in range(i32(u)):
    x = i * 2
/Users/brian/CLionProjects/lpython/src/bin/python /Users/brian/CLionProjects/lpython/lasr/LP-pycharm/IssueCH152.py 
code generation error: Variable type not supported 1
 --> /Users/brian/CLionProjects/lpython/lasr/LP-pycharm/IssueCH152.py:4:1
  |
4 | u : u16 = u16(32768)
  | ^^^^^^^^^^^^^^^^^^^^ 


Note: if any of the above error or warning messages are not clear or are lacking
context please report it to us (we consider that a bug that must be fixed).

Activity

  1. rebcabin
    added
    BLOCKERworkaround not found yetworkaround not found yet
    on Jul 17, 2023
  2. certik
    closed this as completedin #2171on Jul 17, 2023
  3. ubaidsk commented on Jul 17, 2023

    @ubaidsk
    ubaidsk
    on Jul 17, 2023
    Collaborator
    More actions

    Team, I think this issue was already fixed in #2164.

  4. certik commented on Jul 17, 2023

    @certik
    certik
    on Jul 17, 2023
    Contributor
    More actions

    It's not clear if the casting has been implemented properly. I opened up a new issue for this: #2174

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BLOCKERworkaround not found yetworkaround not found yet

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.