Skip to content

[jit] list(string) does not work #20616

@driazati

Description

@driazati

This doesn't work, the error message is also an internal assert

class M(torch.jit.ScriptModule):
    def __init__(self):
        super(M, self).__init__()

    @torch.jit.script_method
    def forward(self, token: str) -> List[str]:
        return list(token)

b = M()

Metadata

Metadata

Assignees

No one assigned

    Labels

    oncall: jitAdd this issue/PR to JIT oncall triage queue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions