Skip to content

Calling map sub with array #262

@chrisws

Description

@chrisws

see: https://smallbasic.discourse.group/t/calling-map-sub-with-array/56

func ctest()
local result={}
sub m_meth(arg)
?arg
end
result.meth=@m_meth
return result
end

arg=[]
c=ctest()

c.meth(1) # works
c.meth(1.1) # works
c.meth(“1”) # works
c.meth({}) # works
c.meth(arg) # works
call c.meth,[] # works
c.meth([]) # dont works

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions