NullPointerException in finalizeStruct

3 views
Skip to first unread message

Chris Cannam

unread,
Feb 19, 2012, 10:42:03 AM2/19/12
to yeti-lang
I have a program that the compiler fails to compile, with

java.lang.NullPointerException
at yeti.lang.compiler.YetiType.finalizeStruct(YetiType.java:497)
at yeti.lang.compiler.YetiType.unifyMembers(YetiType.java:550)
at yeti.lang.compiler.YetiType.unify(YetiType.java:708)
at yeti.lang.compiler.YetiType.unify(YetiType.java:711)
at yeti.lang.compiler.YetiAnalyzer.apply(YetiAnalyzer.java:473)
at yeti.lang.compiler.YetiAnalyzer.analyze(YetiAnalyzer.java:154)
at yeti.lang.compiler.YetiAnalyzer.analSeq(YetiAnalyzer.java:971)
at yeti.lang.compiler.YetiAnalyzer.analyze(YetiAnalyzer.java:80)
at yeti.lang.compiler.YetiAnalyzer.toCode(YetiAnalyzer.java:1656)
at yeti.lang.compiler.CompileCtx.compile(YetiCode.java:355)
at yeti.lang.compiler.CompileCtx.compile(YetiCode.java:323)
at yeti.lang.compiler.CompileCtx.compileAll(YetiCode.java:266)
at yeti.lang.compiler.eval$compileYetiFiles$._0(eval.yeti:250)
at yeti.lang.compiler.eval$compileYetiFiles$.apply(eval.yeti:245)
at yeti.lang.compiler.yeti._3(yeti.yeti:227)
at yeti.lang.compiler.yeti.main(yeti.yeti:220)

(using current git source for the Yeti compiler)

I'm having a bit of trouble working out what the real cause is, though.

If I comment out the ex.trace.add lines around line 497, then I get a
type unification error instead. The error is a long one (102 lines!)
and rather deep; at first glance it doesn't appear to be correct but
I'd be happier trying to narrow that down if I could be confident that
the error was being constructed correctly and the compiler wasn't
getting itself into knots.

Any thoughts, or suggestions for more information I can obtain?

Thanks,


Chris

Madis

unread,
Feb 19, 2012, 2:00:05 PM2/19/12
to yeti-lang

On Sun, 19 Feb 2012, Chris Cannam wrote:

> I have a program that the compiler fails to compile, with
>
> java.lang.NullPointerException
> at yeti.lang.compiler.YetiType.finalizeStruct(YetiType.java:497)
> at yeti.lang.compiler.YetiType.unifyMembers(YetiType.java:550)
>

> (using current git source for the Yeti compiler)

It was an error in constructing error message. Hopefully fixed now.

> I'm having a bit of trouble working out what the real cause is, though.
>
> If I comment out the ex.trace.add lines around line 497, then I get a
> type unification error instead. The error is a long one (102 lines!)
> and rather deep; at first glance it doesn't appear to be correct but
> I'd be happier trying to narrow that down if I could be confident that
> the error was being constructed correctly and the compiler wasn't
> getting itself into knots.

Those ex.trace.add lines are used to collect information for stripping out
unrelevant parts of error message, so maybe now you get a smaller one.

Chris Cannam

unread,
Feb 19, 2012, 2:53:33 PM2/19/12
to yeti...@googlegroups.com
On 19 February 2012 19:00, Madis <ma...@cyber.ee> wrote:
> It was an error in constructing error message. Hopefully fixed now.

It is, thank you.


Chris

Reply all
Reply to author
Forward
0 new messages