diff --git a/compiler/test.hs b/compiler/test.hs index 6ecbf6785..79ae7ceee 100644 --- a/compiler/test.hs +++ b/compiler/test.hs @@ -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 = diff --git a/test/compiler/imported_staticmethod/Acton.toml b/test/compiler/imported_staticmethod/Acton.toml new file mode 100644 index 000000000..e69de29bb diff --git a/test/compiler/imported_staticmethod/src/foo.act b/test/compiler/imported_staticmethod/src/foo.act new file mode 100644 index 000000000..f330b7125 --- /dev/null +++ b/test/compiler/imported_staticmethod/src/foo.act @@ -0,0 +1,9 @@ + + +class Foo(object): + def __init__(self): + pass + + @staticmethod + def new(): + return Foo() diff --git a/test/compiler/imported_staticmethod/src/m.act b/test/compiler/imported_staticmethod/src/m.act new file mode 100644 index 000000000..b70935aa9 --- /dev/null +++ b/test/compiler/imported_staticmethod/src/m.act @@ -0,0 +1,6 @@ + +import foo + +actor main(env): + f = foo.Foo.new() + env.exit(0)