aardappel / lobster

The Lobster Programming Language

Home Page:http://strlen.com/lobster

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assertion in debug version of lobster with maybe incorrect code.

MortimerSnerd opened this issue · comments

I'm at commit 7646612.

This isn't the assert I mentioned in discord, but another I ran into when trying to minimize a reproduction.

Here's the assertion:

Assertion failed: false, file C:\src\lobster\dev\src\lobster\codegen.h, line 189

The code that reproduces it.

class brush_area:
   clusters = []

private let py_triggers = [] :: brush_area

Just giving clusters a type makes the assertion go away. Or adding code that uses clusters in a way that resolves the type, which is why my original file doesn't see that assert.

Something about the py_triggers line contributes. If I replace that with a print(brush_area{}) or some other use of the type, there's no assertion.

Thanks, will look at it soon. Its unhappy that the vector doesn't have a type only if it never gets constructed..