Allow the list hack from issue 1863 to compile, however its behavior is

different than in SL. See http://opensimulator.org/mantis/view.php?id=1863 for
details.
0.6.0-stable
Mike Mazur 2008-07-31 07:11:49 +00:00
parent 57ec7a26cd
commit 16cf5aa2b8
3 changed files with 15723 additions and 15614 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1557,6 +1557,31 @@ default
Assert.AreEqual(expected, output);
}
[Test]
public void TestLSLListHack()
{
string input = @"default
{
state_entry()
{
list l = [""hello""];
l = (l=[]) + l + ""world"";
}
}";
string expected = @"
public void default_event_state_entry()
{
LSL_Types.list l = new LSL_Types.list(""hello"");
l = (l = new LSL_Types.list()) + l + ""world"";
}
";
CSCodeGenerator cg = new CSCodeGenerator();
string output = cg.Convert(input);
Assert.AreEqual(expected, output);
}
[Test]
[ExpectedException("Tools.CSToolsException")]
public void TestSyntaxError()