SpacemanDMM icon indicating copy to clipboard operation
SpacemanDMM copied to clipboard

return type `as list` and is being labeled as a bad return type

Open Zandario opened this issue 1 year ago • 1 comments

This is something that is in the ref and works fine. https://www.byond.com/docs/ref/#/proc

proc/return_list() as list
	return list()

image

Zandario avatar Jul 09 '24 01:07 Zandario

There is also a lesser known one for movable that gets tagged incorrectly image

Zandario avatar Jul 09 '24 01:07 Zandario

so uhh this is Wonky image

ZeWaka avatar Jul 15 '24 06:07 ZeWaka

as list is a special one for proc returns, considering that it's normally in list()

Zandario avatar Jul 15 '24 07:07 Zandario

Looks like as list is offhandedly mentioned in the docs, but it's definitely weird because as ZeWaka notes it's not valid in an as() expression, so I don't know what numeric InputType value to assign it, yet somehow /proc/foo() as obj | list | mob is valid DM.

SpaceManiac avatar Jul 16 '24 01:07 SpaceManiac

as(movable) and as(atom) seem undocumented, but work sanely, so they're in.

SpaceManiac avatar Jul 16 '24 01:07 SpaceManiac

I'd like to know what list's real value is to avoid collisions or other future oddities, but I've given it a placeholder value for now and made it act like any other input type as far as SpacemanDMM is concerned, so as list will parse.

SpaceManiac avatar Aug 09 '24 03:08 SpaceManiac