HashLDash / Photon

Lightning fast and portable programming language!
GNU General Public License v2.0
68 stars 10 forks source link

IndexError when 'new' has no default arguments #142

Closed Huyston closed 2 years ago

Huyston commented 2 years ago
class Test():
    float lol = []
    def new():
        .lol += 1
        print(.lol)

a = Test()

Fails, while this works:

class Test():
    float lol = []
    def new(a=1):
        .lol += 1
        print(.lol)

a = Test()