Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bugfix] native class can be inherited in script #280

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

khchen
Copy link

@khchen khchen commented Jul 21, 2022

Example:

from types import Vector

class Vector2 is Vector
  def *=(n)
    self.x *= n; self.y *= n; self.z *= n
    return self
  end
end

v = Vector2(1, 2, 3)
v *= 2
print(v)

Output:

[2, 4, 6]

@khchen khchen changed the title [BUGFIX] native class can be inherited in script [Bugfix] native class can be inherited in script Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant