Community
Participate
Working Groups
yloiseau commented on 1 Mar To get a reference to a function defined in an imported module using the ^ operator, it must be fully qualified, contrary to its usage. For instance, given the module: module foo function bar = -> "bar in foo" and a module using it: module baz import foo function main = |args| { println(bar()) let fqn_ref = ^foo::bar println(fqn_ref()) let ref = ^bar println(ref()) } The direct call works as expected, as the fully qualified reference. But the last assignment yields a NoSuchMethodException: bar in class baz, which seems counter intuitive since it is “visible in the local scope” (or act as if).
yloiseau commented on 5 Mar Is this a feature? :wink: -------------------------------------------- jponge commented on 5 Mar No, feel free to fix it :smile: -------------------------------------------- yloiseau commented on 5 Mar Ok, I'll try to have a look... -------------------------------------------- jponge commented on 5 Mar Great! -------------------------------------------- yloiseau commented on 5 Mar Just wanted to be sure that it's not on purpose (performances or explicitness) that imported modules are not looked up for function references :smile: -------------------------------------------- jponge commented on 6 Mar Because the bootstrap method yields a constant call site, you need to look into the caller module imports. Same for #248 -------------------------------------------- yloiseau commented on 6 Mar yep, it's the path I'm investigating -------------------------------------------- yloiseau commented on 6 Mar not as trivial as I first thought :smile: