Discord
Login
Community
DARK THEME

editor confusing class keyword with object's class variable

In this function the editor matches the second "end" with the "class" in "b.class" instead of "function", which causes it to do autotabs wrong and completely breaks code collapsing.

function(a,b)
  if b.class == Vector2 then
    return new Vector2( a.x + b.x, a.y + b.y )
  end
end

Yes the syntax highlighter / auto-indent thing fails to detect this properly as a field access. It's annoying because checking b.class is indeed the regular way to check if an object is an instance of a given class. I will try to fix that.

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community