Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG?] Ambiguous identifier when pattern matching #9

Open
Pauan opened this issue Apr 24, 2017 · 1 comment · May be fixed by #636
Open

[BUG?] Ambiguous identifier when pattern matching #9

Pauan opened this issue Apr 24, 2017 · 1 comment · May be fixed by #636

Comments

@Pauan
Copy link

Pauan commented Apr 24, 2017

Consider these two files:

module foo

import bar

type foo {
  Foo
}

fun to-int(x: foo): int {
  match (x) {
    Foo -> 1
  }
}
module bar

public type bar {
  Foo
}

I get this error:

src/foo.kk(11, 5): error: identifier Foo is ambiguous. Possible candidates: 
  Foo    : foo
  bar/Foo: bar/bar
  hint   : give a type annotation to the function parameters or arguments

This seems wrong: I have specified that x has type foo, so it isn't ambiguous.

@TimWhiting TimWhiting added this to the Small Release milestone Dec 21, 2024
@TimWhiting TimWhiting linked a pull request Dec 22, 2024 that will close this issue
@TimWhiting
Copy link
Collaborator

I have a fix in a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants