diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2023-12-30 23:39:37 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2023-12-30 23:39:37 +0100 |
| commit | 263915832993dd12beee10e204f9ebcc6c786ed2 (patch) | |
| tree | 862e51208a99c35746e574a76564a4532b3a4a49 /CompilerDriver/cc2/regression-tests/pure2-bugfix-for-unbraced-function-expression.cpp2 | |
Meta: initial commit of WestCo optimized toolchain.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'CompilerDriver/cc2/regression-tests/pure2-bugfix-for-unbraced-function-expression.cpp2')
| -rw-r--r-- | CompilerDriver/cc2/regression-tests/pure2-bugfix-for-unbraced-function-expression.cpp2 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/CompilerDriver/cc2/regression-tests/pure2-bugfix-for-unbraced-function-expression.cpp2 b/CompilerDriver/cc2/regression-tests/pure2-bugfix-for-unbraced-function-expression.cpp2 new file mode 100644 index 0000000..6fb1d13 --- /dev/null +++ b/CompilerDriver/cc2/regression-tests/pure2-bugfix-for-unbraced-function-expression.cpp2 @@ -0,0 +1,15 @@ +t: type = { + operator[]: (this, _) = { } +} + +main: () -> int = { + (x := t()) { x[:() -> _ = 0]; } + (x := t()) { x[:() -> _ = 0;]; } + + assert(!(:() 0; is int)); + + return :i32 = 0; +} + +x :== :i32 = 0; +y: i32 = 0; |
