]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Overloading2.scl
migrated to svn revision 33108
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / scl / Overloading2.scl
diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Overloading2.scl b/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Overloading2.scl
new file mode 100644 (file)
index 0000000..e7a28de
--- /dev/null
@@ -0,0 +1,20 @@
+// module Max1
+import "Prelude"
+
+myMax :: Ord a => a -> a -> a
+myMax = max
+--
+// module Max2
+import "Prelude"
+
+myMax :: Ord a => a -> a -> a -> a
+myMax a b c = max a (max b c)
+--
+import "Prelude"
+import "Max1"
+import "Max2"
+
+main = myMax (1 :: Integer) 2 3 + myMax (3 :: Integer) 2 1 + myMax 4 2 :: Integer
+--
+10
+