Jaseci-Labs / jaclang

The Jac Programming Language
https://www.jac-lang.org
22 stars 21 forks source link

[BUG] : Jaclang init() cannot distinguish between __init__() and init() in pygame #259

Closed Jayanaka-98 closed 7 months ago

Jayanaka-98 commented 7 months ago

Describe the bug When the RPG game is executed the following error occurs. image Here pygame.init() does not intend to run __init__ on pygame object. pygame.init() is just a defined function.

To Reproduce In terminal (on main): cd examples/rpg_game/jac_impl/jac_impl_3/ jac run main.jac

Jaclang/Python Version Python 3.11.3 and Jac installed from source.

Screen Cap. image

marsninja commented 7 months ago

Hi @Jayanaka-98 , have the keyword escape feature of Jac solves this.

Use

pygame.<>init();