omgomgomgomgomg
2 files changed, 23 insertions(+), 0 deletions(-)

M fml/tests/main.rs
A => fml/tests/test_typedef4.gt
M fml/tests/main.rs +6 -0
@@ 102,6 102,12 @@ fn test_typedef3() {
 }
 
 #[test]
+fn test_typedef4() {
+    let src = include_str!("test_typedef4.gt");
+    let _output = fml::compile("test_typedef4.gt", src);
+}
+
+#[test]
 fn test_struct1() {
     let src = include_str!("test_struct1.gt");
     let _output = fml::compile("test_struct1.gt", src);

          
A => fml/tests/test_typedef4.gt +17 -0
@@ 0,0 1,17 @@ 
+
+type Foo(@A) = {I32, @A}
+
+fn thing(i: I32, x: @A): Foo(@A) =
+    $Foo(@A) {i, x}
+end
+
+fn thing2(i: I32, x: @A): {I32, @A} =
+    {i, x}
+end
+
+fn main(): I32 =
+    let f1: Foo(I32) = thing(4, 5)
+    let f2: Foo(Bool) = thing(4, true)
+    let f2: {I32, Bool} = thing2(4, true)
+    3
+end