Skip to content

Missing semicolon after lambda assignment #111

@Lxtharia

Description

@Lxtharia

Hello it's me (again).

I have a weird issue where the semicolon is missing after the assignment of a lambda expression if there is an if statement without a block inside the lambda.

This is missing a semicolon:

(function main () -> void 
  (set mylambda
       (lambda-function (&) () 
                        (when true 
                          ((<< cout "True"))))))

; void main()
; {
; 	mylambda = 
; 		[&]()
; 		{
; 			if (true)
;				cout << "True"();
;		} // <- Missing a semicolon Here
; }

While this generates it correctly:

(function main () -> void 
  (set mylambda
       (lambda-function (&) () 
                        (when true 
                          (comment "Very true")
                          (<< cout "True")))))

; void main()
; {
;	mylambda = 
;		[&]()
;		{
;			if (true) {
;				//Very true
;				cout << "True";
;			}
;		};
; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions