Yeah. I was planning on spending time on the compiler, but time has not been 
recently as forthcoming as I was hoping… ;-)

FWIW, my daughter is finishing school soon and I’m going to have her try and 
learn the compiler. I’ll see how that goes…

Harbs

> On May 1, 2018, at 7:53 PM, Alex Harui <aha...@adobe.com.INVALID> wrote:
> 
> Sorry,  I thought the link was to the source so I didn't click on it.
> 
> This could be a good exercise for anyone wanting to learn more about the 
> compiler to figure out how to catch this situation (maybe by detecting the 
> AST for "void 0") and outputting an error instead of an NPE, or swapping in 
> "undefined".
> 
> -Alex
> 
> On 5/1/18, 9:35 AM, "Harbs" <harbs.li...@gmail.com> wrote:
> 
>    I attached a paste of the stack in my email.
> 
>    I just finished resolving all my errors. It was hard to trace them down, 
> but I just discovered that there were uses of "void 0" in the code. I 
> replaced all those cases with “undefined" and poof! All my errors went away! 
> :-)
> 
>    My theory is that use of void 0 was confusing the compiler and causing 
> errors elsewhere… I’m not sure how to demonstrate this…
> 
>    Harbs
> 
>    (P.S. Sorry I’ve been so quiet lately. Life has been pretty busy… ;) )
> 
>> On May 1, 2018, at 7:03 PM, Alex Harui <aha...@adobe.com.INVALID> wrote:
>> 
>> What is the call stack for the null pointer?
>> 
>> On 5/1/18, 5:05 AM, "Harbs" <harbs.li...@gmail.com> wrote:
>> 
>>   I’m trying to compile a library using comic and I’m getting a **LOT** of 
>> null pointer errors. They seem to be related to missing type information, 
>> although I’m not completely sure why the missing type information is causing 
>> these errors.
>> 
>>   Some of the errors are resolved-able by adding type info, but not all.
>> 
>>   I picked one at random to track down the issue:
>>   
>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F8pLB&data=02%7C01%7Caharui%40adobe.com%7C31fb16c8d65948a50da008d5af5bd2c6%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607731304191116&sdata=ik%2FnmWaooQD%2BwLT6VM1JN1ypa4BdOXe8VS1NfyF5FUw%3D&reserved=0
>>  
>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F8pLB&data=02%7C01%7Caharui%40adobe.com%7C31fb16c8d65948a50da008d5af5bd2c6%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607731304191116&sdata=ik%2FnmWaooQD%2BwLT6VM1JN1ypa4BdOXe8VS1NfyF5FUw%3D&reserved=0>
>> 
>>   The line in question looks like this:
>>   var codepoint:int = glyphs[i].codePoints[0];
>> 
>>   glyphs[I] is a “GlyphInfo” instance. Either of the following two changes 
>> make this particular error go away:
>>   var codepoint:* = glyphs[i].codePoints[0];
>>   var codepoint:int = (glyphs[i] as GlyphInfo).codePoints[0];
>> 
>>   I’m not really sure why these changes are necessary though…
>> 
>>   Thoughts?
>>   Harbs
>> 
> 
> 
> 

Reply via email to