Home /Modules/tests/README.md

README.md

tests/sleela-syntax-1.8/README.md · 42 line(s) · markdown

<img align="right" src="https://github.com/mearvk/SLeeLa/blob/master/images/debian/debian-logo.png" width="75" height="75" alt="SLeeLa">

SLeeLa syntax 1.8 regression fixtures

These fixtures exercise the two syntax 1.8 features: local type inference with let, and constructor arguments on new Type(args).

Inferred locals (let):

Constructor arguments:

Run them from the repository root after building the native compiler:

make -C impl
impl/build/sleela run tests/sleela-syntax-1.8/let-inference-pass.sleela
impl/build/sleela run tests/sleela-syntax-1.8/let-inference-invalid-null.sleela
impl/build/sleela run tests/sleela-syntax-1.8/constructor-args-pass.sleela
impl/build/sleela run tests/sleela-syntax-1.8/constructor-arity-invalid.sleela
impl/build/sleela run tests/sleela-syntax-1.8/constructor-overload-unsupported.sleela

The -invalid/-unsupported commands are expected to fail with an explicit semantic error. The 1.8 constructor feature is limited to a single declared constructor whose arity and argument types match; overload resolution and this(...)/base delegation are intentionally rejected rather than silently narrowed.