You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected: When an effect function and a type property have the same name, then the compiler can correctly resolve the function name in the effect handler definition. Actual: The compiler is unable to discern that the name refers to an effect function handler definition and not the property name of a type. Furthermore, the effect function name is unable to be qualified in any way (that I can think of) that would resolve the issue.
type foo
Foo
bar: string
effect some-effect
fun bar(name: string) : foo
fun main()
with handler
fun bar(name) Foo(bar=name)
^^^
// error: identifier bar cannot be resolved.
// context : bar(name)
// inferred type: (_) -> _
// candidates : bar : (name : string) -> some-effect foo
// foo/bar: (foo : foo) -> string
// hint : give a type annotation or qualify the name?
()
The text was updated successfully, but these errors were encountered:
jameswoodleybetenbough
changed the title
Compiler confusing property name with function name
Compiler confusing property name with effect function name
Feb 14, 2024
Expected: When an effect function and a type property have the same name, then the compiler can correctly resolve the function name in the effect handler definition.
Actual: The compiler is unable to discern that the name refers to an effect function handler definition and not the property name of a type. Furthermore, the effect function name is unable to be qualified in any way (that I can think of) that would resolve the issue.
The text was updated successfully, but these errors were encountered: