fubark / cyber

Fast and concurrent scripting.
https://cyberscript.dev
MIT License
1.16k stars 38 forks source link

Web Interpreter Can't Use Int Type #65

Closed Capital-EX closed 11 months ago

Capital-EX commented 11 months ago

Playing around with the online interpreter, it seems like the web build doesn't have access to the float time. Additionally, there is no warning nor error about this. So, I was confused when this code:

func foobar(x int):
    print("Got a int")

func foobar(x float):
    print("Got a... float?")

foobar(1)

Always took the float path.

fubark commented 11 months ago

You may want to clear the web cache as I just uploaded latest.

func foobar(x int):
    print("Got a int")

func foobar(x float):
    print("Got a... float?")

foobar(1)
foobar(1.0)
Got a int
Got a... float?
success: 2ms
Capital-EX commented 11 months ago

Oh, nice! It's all fixed up for me now.