mys-lang / mys

The Mys programming language - an attempt to create a statically typed Python-like language that produces fast binaries. See https://mys-lang.org for more information.
Other
132 stars 5 forks source link

List comprehension in match does not work. #47

Closed eerimoq closed 3 years ago

eerimoq commented 3 years ago

What did you do?

def code_generator(node: Node) -> string:
    match node:
        case ProgramNode() as program_node:
            return "\n".join([code_generator(item) for item in program_node.body])

    return "todo"
build/default/cpp/src/the_super_tiny_compiler/main.mys.cpp:38:149: error: no member named 'ProgramNode' in namespace 'mys'
static SharedList<String> __list_comprehension_29(const std::shared_ptr<mys::the_super_tiny_compiler::main::Node>& node, const std::shared_ptr<mys::ProgramNode>& program_node)

What did you expect to see?

What did you see instead?

Mys version