Skip to content

Commit

Permalink
Preserve C# 4 compatibility
Browse files Browse the repository at this point in the history
Unity's C# compiler can't handle declaration expressions[1], so we need to do it in a semantically identical but syntactically different way.

[1] A declaration expression is something like:

DoSomething(out var foo);

instead of

string foo;
DoSomething(out foo);
  • Loading branch information
desplesda committed Jul 31, 2017
1 parent f2032d6 commit a52b710
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion YarnSpinner/AntlrCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,8 @@ public String toDot()
buf.Append("\n");
foreach (String src in edges.Keys)
{
if (edges.TryGetValue(src, out var output))
IList<string> output;
if (edges.TryGetValue(src, out output))
{
foreach (String trg in output)
{
Expand Down

0 comments on commit a52b710

Please sign in to comment.