8000 Incorrect resolution of shadowed names in mutual blocks · Issue #1139 · links-lang/links · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Incorrect resolution of shadowed names in mutual blocks #1139
Open
@jamescheney

Description

@jamescheney

Consider the following (contrived) program:

mutual {
fun bar() { 42 }

fun baz() { 17 }

fun foo(f){ f() }

}

foo(bar)

This should call foo, then bar,then return 42. And it does.

Now consider the following, alpha-renamed program.

mutual {
fun bar() { 42 }

fun baz() { 17 }

fun foo(baz){ baz() }

}

foo(bar)

This should call foo, then bar, then return 42. And it does not.

From looking at the generated IR, for some reason the bindings of mutually recursive functions in mutual blocks are being used instead of local parameter names when there is a conflict.

In some examples in #1136 this appears to be making something work inside a mutual block by accident that otherwise doesn't.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0