Skip to content

An asterisk at the start of the line before @require prevents it from being checked #2254

Open
@TechnicalFowl

Description

@TechnicalFowl

It's a habit that goes back a long way for me to put an asterisk at the start of each line in a block comment for a function ref. But doing this silently prevents the @require from functioning.

Reproducer:

<*
 * @require input < 10
 *>
fn void do_bar(int input)
{
    io::printfn("Doing bar on %d", input);
}

fn void main()
{
    do_bar(16);
}

Expected output:

11: 
12: fn void main()
13: {
14:     do_bar(16);
        ^^^^^^^^^^
(C:/Data/dx12.c3l/examples/test/src/main.c3:14:5) Error: @require "input < 10" violated.

Actual output:

Doing bar on 16

C3C version:

C3 Compiler Version:       0.7.3 (Pre-release, Jun 27 2025 11:41:15)
Installed directory:       C:/Data/c3c/build/Release/
Git Hash:                  962a1fc8733c386eeba68360213964da5eabd2a6
Backends:                  LLVM
LLVM version:              19.1.5
LLVM default target:       x86_64-pc-windows-msvc

Metadata

Metadata

Assignees

No one assigned

    Labels

    Discussion neededThis feature needs discussion to iron out details

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions