Amber icon indicating copy to clipboard operation
Amber copied to clipboard

[Feature] Compiler flags for any block

Open KrosFire opened this issue 9 months ago • 2 comments

I think using compiler flags only for functions is too restrictive and should be broaden to all blocks.

For example this code:

main {
  let x = "asd"

  echo x as Num
}

Raises warning that it's not recommended to do such a cast and recommends adding allow_absurd_cast compiler flag for suppression, but it's not possible currently

KrosFire avatar Mar 19 '25 19:03 KrosFire

so the proposed syntax would be:

main {
   let x = "asd"

   #[allow_absurd_cast]
   echo x as num
}

b1ek avatar Mar 20 '25 05:03 b1ek

To sum things up. I understand that this feature should be implemented for statements as well as for blocks

Ph0enixKM avatar Jul 13 '25 16:07 Ph0enixKM