luke-gru / riml

Riml is a subset of VimL with some nice added features. It compiles to plain VimL.
MIT License
224 stars 6 forks source link

Passing `new Object()` as an argument #8

Closed dsawardekar closed 11 years ago

dsawardekar commented 11 years ago

@luke-gru I'm having an issue with creating and passing an object to a function as an argument.

The following code compiles without errors.

class Person
end

def add_person(person)
  echo 'add_person'
end

add_person(new Person())

The compiled code contains an extra newline in the add_person call.

function! g:PersonConstructor()
  let personObj = {}
  return personObj
endfunction
function! s:add_person(person)
  echo 'add_person'
endfunction
call s:add_person(g:PersonConstructor()
)

This extra newline makes this code invalid.

luke-gru commented 11 years ago

Thanks for the report! Will fix, and let you know when it's ready.

EDIT: fixed in master. No new release created yet, but I will make a 0.3.0 release soon. Thanks again!

dsawardekar commented 11 years ago

Confirmed fixed in master.