-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Bug description
Error printing Python nested list in Mojo environment, no error reported in normal Python environment~
Steps to reproduce
mojo:
nested_list = [[1, 2], [3, 4], [5, 6]]
print(nested_list)
[User] error: wrapped Expression [11]:6:1: no viable expansions found
fn __lldb_expr__11(inout __mojo_repl_arg: mojo_repl_context):
^
wrapped Expression [11]:8:28: call expansion failed - no concrete specializations
mojo_repl_expr_impl(__mojo_repl_arg, __get_address_as_lvalue(__mojo_repl_arg.ar
.load().address), __get_address_as_lvalue(__mojo_repl_arg.np
.load().address), __get_address_as_lvalue(__mojo_repl_arg.nested_list
.load().address))
^
wrapped Expression [11]:12:1: no viable expansions found
def mojo_repl_expr_impl(inout __mojo_repl_arg: mojo_repl_context, inout ar
: __mlir_type.!kgen.declref<@"$python"::@"$object"::@PythonObject>
, inout np
: __mlir_type.!kgen.declref<@"$python"::@"$object"::@PythonObject>
, inout nested_list
: __mlir_type.!kgen.declref<@"$builtin"::@"$builtin_list"::@ListLiteral<_18x21_Ts: variadic<type> = [@"$builtin"::@"$builtin_list"::@ListLiteral<_18x21_Ts: variadic<type> = [!kgen.declref<@"$builtin"::@"$int"::@Int>, !kgen.declref<@"$builtin"::@"$int"::@Int>]>, @"$builtin"::@"$builtin_list"::@ListLiteral<_18x21_Ts: variadic<type> = [!kgen.declref<@"$builtin"::@"$int"::@Int>, !kgen.declref<@"$builtin"::@"$int"::@Int>]>, @"$builtin"::@"$builtin_list"::@ListLiteral<_18x21_Ts: variadic<type> = [!kgen.declref<@"$builtin"::@"$int"::@Int>, !kgen.declref<@"$builtin"::@"$int"::@Int>]>]>>
) -> None:
^
wrapped Expression [11]:19:26: call expansion failed - no concrete specializations
mojo_repl_expr_body()
^
wrapped Expression [11]:14:3: no viable expansions found
def mojo_repl_expr_body() -> None:
^
Expression [11]:2:7: call expansion failed - no concrete specializations
print(nested_list)
^
expression failed to parse (no further compiler diagnostics)
System information
- What OS did you do install Mojo on ?
- Provide version information for Mojo by pasting the output of `mojo -v`
- Provide Modular CLI version by pasting the output of `modular -v`
root@good:~# cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
root@good:~# mojo -v
mojo 0.4.0 (9e33b013)
root@good:~# modular -v
modular 0.2.0 (355ea9c0)