]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/JavaTypes.scl
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / scl / JavaTypes.scl
diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/JavaTypes.scl b/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/JavaTypes.scl
new file mode 100644 (file)
index 0000000..830c5a4
--- /dev/null
@@ -0,0 +1,14 @@
+import "JavaBuiltin" as Java\r
+\r
+importJava "java.math.BigInteger" where\r
+    data BigInteger\r
+    \r
+    @JavaName "add"\r
+    (+) :: BigInteger -> BigInteger -> BigInteger\r
+\r
+    @JavaName "<init>"\r
+    fromString :: String -> BigInteger\r
+\r
+main = fromString "123" + fromString "234"\r
+--\r
+357
\ No newline at end of file