c3c icon indicating copy to clipboard operation
c3c copied to clipboard

Fix @const annotation

Open raynei86 opened this issue 3 years ago • 1 comments

The following code will not compile:

/**
 * @ensure const(bar)
 **/
fn void foo(int bar) {}

The compiler gives this error:

/**
 * @ensure const(bar)
           ^^^^^
Error: An expression was expected.

And when you change it up to this:

/**
 * @const bar
 **/
fn void foo(int bar) {}

The error becomes:

/**
 * @const bar
          ^^^
Error: Expected end of line.

raynei86 avatar Aug 27 '22 20:08 raynei86

I think I might remove this annotation. It's not super useful when in/out/inout exists.

lerno avatar Sep 30 '22 20:09 lerno