Skip to content

Instantly share code, notes, and snippets.

@arturaz
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arturaz/1645200a73ac55eaf72e to your computer and use it in GitHub Desktop.
Save arturaz/1645200a73ac55eaf72e to your computer and use it in GitHub Desktop.
Unity compiler is buggy
ctx => { var i = ctx._1; var bi = ctx._2; var map = ctx._3;
Log.editor("flatMap subIter skip: \n ctx=" + ctx + "\n i=" + i + "\n bi=" + bi);
Outputs:
ctx=(
Iter(Some((System.Collections.Generic.List`1[System.Int32],0,False))|sh:Some(3)),
Iter(Some((System.Collections.Generic.List`1[System.Int32],0,False))|sh:Some(2)),
System.Fn`2[System.Int32,com.tinylabproductions.TLPLib.Iter.Iter`2[System.Int32,System.Tpl`3[System.Collections.Generic.IList`1[System.Int32],System.Int32,System.Boolean]]]
)
i=Iter(Some((System.Collections.Generic.List`1[System.Int32],0,False))|sh:Some(3))
bi=Iter(Some((System.Collections.Generic.List`1[System.Int32],0,False))|sh:Some(3))
If ctx = struct Tpl<P1, P2, P3> {
public readonly P1 _p1;
public readonly P2 _p2;
public readonly P3 _p3;
}
Works with ctx = struct Tpl<P1, P2, P3> {
public P1 _p1 { get; private set; }
public P2 _p2 { get; private set; }
public P3 _p3 { get; private set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment