arturo-lang / arturo

Simple, expressive & portable programming language for efficient scripting
http://arturo-lang.io
MIT License
708 stars 32 forks source link

[Core\let] SIGSEGV error when using the alias `:` #1126

Open RickBarretto opened 1 year ago

RickBarretto commented 1 year ago

Describe the bug

$> let 'a
>> Runtime | cannot perform let
     error | not enough parameters: 2 required
$> a:
SIGSEGV: Illegal storage access. (Attempt to read from nil?)

a: without arguments should return a Runtime error as for let 'a without arguments.

Desktop (please complete the following information):

Additional context This message from Discord

drkameleon commented 1 year ago

Tricky one!

Again the AST generation comes into play (since a: is not technically let yet...) So, apparently, it keeps looking for a right-hand parameter that doesn't exist... Let's see!...

Good catch and an important issue that we should somehow tackle! 🚀

RickBarretto commented 1 year ago

since a: is not technically let yet...

Yeah, I notice this since let just can get :block :string or :literal, I can't do let a "some text", while I can do it with :: a: "some text"

stale[bot] commented 11 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

RickBarretto commented 9 months ago

I just discovered a few more things. As, for example, this being a valid syntax: : 'a 10...

image

stale[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.