Skip to content

Commit

Permalink
Add test for calling imported staticmethods
Browse files Browse the repository at this point in the history
Currently failing due to some compiler issue.
  • Loading branch information
plajjan committed Oct 23, 2024
1 parent 8b4fff2 commit c7dd49e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ compilerTests =
(returnCode, cmdOut, cmdErr) <- readCreateProcessWithExitCode (shell $ "rm -rf ../test/compiler/test_deps/deps/a/build.zig*") ""
(returnCode, cmdOut, cmdErr) <- readCreateProcessWithExitCode (shell $ "rm -rf ../test/compiler/test_deps/deps/a/out") ""
runActon "build" ExitSuccess False "../test/compiler/test_deps/"
, testCase "call imported staticmethod" $ do
(returnCode, cmdOut, cmdErr) <- readCreateProcessWithExitCode (shell $ "rm -rf ../test/compiler/import_staticmethod/out") ""
testBuild "" ExitSuccess False "../test/compiler/import_staticmethod/"
]

actoncProjTests =
Expand Down
Empty file.
9 changes: 9 additions & 0 deletions test/compiler/imported_staticmethod/src/foo.act
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@


class Foo(object):
def __init__(self):
pass

@staticmethod
def new():
return Foo()
6 changes: 6 additions & 0 deletions test/compiler/imported_staticmethod/src/m.act
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

import foo

actor main(env):
f = foo.Foo.new()
env.exit(0)

0 comments on commit c7dd49e

Please sign in to comment.