]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Record3.scl
(refs #7498) Bugfixing implementation of skeleton refs
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / Record3.scl
diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Record3.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Record3.scl
new file mode 100644 (file)
index 0000000..3e14cf7
--- /dev/null
@@ -0,0 +1,14 @@
+module {
+    features = [fields]
+}
+
+import "Prelude"
+
+data Foo = Foo { x :: Double }
+data Bar = Bar { x :: Double, y :: Double }
+
+main = sum $ map (\v -> v.x) l
+  where
+    l = [Foo 1.0, Foo 2.0]
+-- 
+3.0
\ No newline at end of file