X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=tests%2Forg.simantics.scl.compiler.tests%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ftests%2Fscl%2FInlineBug.scl;fp=tests%2Forg.simantics.scl.compiler.tests%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ftests%2Fscl%2FInlineBug.scl;h=e4ab0919ebfd19263465bf824cabad5180a2a0ca;hp=0000000000000000000000000000000000000000;hb=bfff906222d6990f2e8af0294fc0840450631949;hpb=015e75fa0a04ef370eaff4980cd34cf4bbc0b733 diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/InlineBug.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/InlineBug.scl new file mode 100644 index 000000000..e4ab0919e --- /dev/null +++ b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/InlineBug.scl @@ -0,0 +1,25 @@ +import "Prelude" +import "Vector" +import "File" + +@private +copyDir2 :: File -> () +copyDir2 sourceDir = iter copyDir $ vectorToList $ listFiles sourceDir + +@private +copyDir :: File -> File -> () +copyDir sourceDir targetDir = do + makeDirs targetDir + files = vectorToList $ listFiles sourceDir + iter (\sourceFile -> do + targetFile = childFile targetDir $ nameOfFile sourceFile + if isDirectory sourceFile then + copyDir sourceFile targetFile + else + copyFile sourceFile targetFile + ) files + () + +main = "OK" +---- +OK