aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorCamil Staps2017-07-27 22:53:45 +0200
committerCamil Staps2017-07-27 22:53:45 +0200
commitbf0a7bb68485c87737677e4bbb5278b24dcb24cc (patch)
tree468c77df0e0e7e5d05047c8aec50b77d57d3b5dc /examples
parentOptimise multiple pop instructions (diff)
Add tuples (see #1)
Diffstat (limited to 'examples')
-rw-r--r--examples/issue-1.sil11
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/issue-1.sil b/examples/issue-1.sil
new file mode 100644
index 0000000..28c6958
--- /dev/null
+++ b/examples/issue-1.sil
@@ -0,0 +1,11 @@
+Int fst((Int, Int) tup) {
+ return tup._1;
+}
+
+(Int, Int) swap((Int, Int) tup) {
+ return (tup._2, tup._1);
+}
+
+Int main() {
+ return fst(swap((1,10)));
+}