polserver/testsuite/escript/ast
Kevin Eady ddc1b5d26b
Add Escript support for uninitialized class functions (#808)
* update grammar

* AST nodes and test

* Address self-review comments
- Replace `super` comment with something more explanatory
- Rename `make_user_function`

* add class analysis for uninit functions

* fix ast test after disallowing static uninit funcs

* use std::ranges::find_if

* add tests

* use SUPER constant; add test

* Remove unreachable code leftover from #809

Since #809, the super function is only generated for a class when
registering a parent class, and therefore it will always have a body. A
"No base class defines a constructor" will only occur if super was never
generated, and is handled in the "No function linked through
FunctionResolver" section of semantic analyzer.

* Address review comments
- use std::ranges::move instead of move iterators
- use std::is_same_v<> vs std::is_same<>::value
- use switch vs chained ternary conditionals

* update escript guide, create tests that are in escript guide

* add core-changes

* Error on uninit and defined constructor

* Move methods' FunctionLink construction to builder

This allows the error message for the uninit function to have a "See
Also" that point to the defined function.

* Move error checks for uninit and defined functions

These semantic checks should be in the ... SemanticAnalyzer.

* fix typo in core-changes
2025-09-05 23:23:59 +02:00
..
ast001.out Add ecompile flag -Z to print AST (#796) 2025-07-23 23:00:34 +02:00
ast001.src Add ecompile flag -Z to print AST (#796) 2025-07-23 23:00:34 +02:00
ast002.out Short Circuit Optimizer (#797) 2025-07-28 21:48:34 +02:00
ast002.src Short Circuit Optimizer (#797) 2025-07-28 21:48:34 +02:00
ast003.optimized.out Short Circuit Optimizer (#797) 2025-07-28 21:48:34 +02:00
ast003.out Short Circuit Optimizer (#797) 2025-07-28 21:48:34 +02:00
ast003.src Short Circuit Optimizer (#797) 2025-07-28 21:48:34 +02:00
ast004.out Add Escript support for uninitialized class functions (#808) 2025-09-05 23:23:59 +02:00
ast004.src Add Escript support for uninitialized class functions (#808) 2025-09-05 23:23:59 +02:00
astfile.inc Add ecompile flag -Z to print AST (#796) 2025-07-23 23:00:34 +02:00