Skip to content

MSVC gives different outputs compared to WSL build, Linux/Mac OS ? #1593

Open
@faze-geek

Description

@faze-geek

I have come across some instances where I felt that the MSVC build set up gives different outputs to other machines. One such case can be seen in #1590 .

Snippet -

def fun():
    x : dict[i32, i32] = {1: 2}
    print(x[1])

    y : dict[str, i32]
    y = {"apple": 1}
    print(y["apple"])

fun()

On my MSVC windows setup -

(lp) C:\Users\kunni\lpython>src\bin\lpython try.py
code generation error: Variable type not supported 12
 --> try.py:5:5
  |
5 |     y : dict[str, i32]
  |     ^^^^^^^^^^^^^^^^^^

On my WSL with windows setup -

(lp) faze-geek@DESKTOP-497JDCU:~/lpython/lpython$ ./src/bin/lpython try.py
2
1

@Smit-create @certik Any possible reasons why this might be happening. We should look into this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions