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
When importing a class with a qualified import, it is not possible to call staticmethods. It is possible to work around by importing the exact class with a from X import Y and then it is possible to call the staticmethod
kll@Kristians-MacBook-Air imported_staticmethod % acton buildBuilding project in /Users/kll/dt/acton/test/compiler/imported_staticmethod Compiling foo.act for release Finished compilation in 0.004 s Compiling m.act for releaseERROR: Error when compiling m module: Type error |5 | f = foo.Foo.new() | ^^^^^^^The type of the indicated expression (inferred to be () -> foo.Foo) must have an attribute new with type _(+, ++) -> _; no such type is known.- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
I added this as a testcase in PR #1958, so when we have a fix, please commit and push it to the imported-staticmethod branch and the test should pass and we can merge that PR.
The text was updated successfully, but these errors were encountered:
@nordlander I think you have sort of diagnosed this behavior when we were in a call. I don't remember exactly why it was. I couldn't find an existing issue, so opening this...
When importing a class with a qualified import, it is not possible to call staticmethods. It is possible to work around by importing the exact class with a
from X import Y
and then it is possible to call the staticmethodIn module
foo
:in main module:
and we get:
I added this as a testcase in PR #1958, so when we have a fix, please commit and push it to the
imported-staticmethod
branch and the test should pass and we can merge that PR.The text was updated successfully, but these errors were encountered: