Hotfix for miscompilation in lambdas that return lambdas
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		
							parent
							
								
									a0554d0d2e
								
							
						
					
					
						commit
						523509d300
					
				| @ -1,10 +1,13 @@ | ||||
| 
 | ||||
| var i = 0 | ||||
| 
 | ||||
| let pr = lambda (str): | ||||
| var printer = lambda (pfx): | ||||
| 	return lambda (msg): | ||||
| 		@print("This is a func call") | ||||
| 	@print(str) | ||||
| 		@print(msg) | ||||
| 	end | ||||
| end | ||||
| 
 | ||||
| let pr = printer("This is a func call") | ||||
| var i = 0 | ||||
| 
 | ||||
| pr("") | ||||
| 
 | ||||
|  | ||||
| @ -673,8 +673,6 @@ pub const Tree = struct { | ||||
| 
 | ||||
| 		switch (self.tokenizer.token) { | ||||
| 			.keyword_return => { | ||||
| 				defer self.tokenizer.skip_newlines(); | ||||
| 
 | ||||
| 				if (self.has_returned) { | ||||
| 					return self.report("multiple returns in lambda scope but expected only one"); | ||||
| 				} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user