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
							parent
							
								
									57ec7a26cd
								
							
						
					
					
						commit
						16cf5aa2b8
					
				
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -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() | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Mike Mazur
						Mike Mazur