assert is supposed to be org.apache.royale.debugging.assert.

Considering it’s in the same package, an import shouldn’t be necessary, but 
maybe something happened to the compiler...

> On Oct 28, 2020, at 10:17 AM, Yishay Weiss <[email protected]> wrote:
> 
> I was getting a run-time error. Something like “assert is not a function of 
> org.apache.royale.debugging.assertType”. When I looked it up [1] I saw that 
> console.assert() was a js function, but I did now see window.assert() being a 
> function.
> 
> If I remember correctly it was being called from XML.addInternalChildren()
> 
> Feel free to change this if you think I made a mistake.
> 
> [1] https://developer.mozilla.org/en-US/docs/Web/API/Console/assert
> 
> 
> From: Harbs<mailto:[email protected]>
> Sent: Tuesday, October 27, 2020 6:55 PM
> To: [email protected]<mailto:[email protected]>
> Subject: Re: [royale-asjs] branch develop updated: Fix assertType for js
> 
> Why was this necessary?
> 
>> On Oct 27, 2020, at 5:55 PM, [email protected] wrote:
>> 
>> This is an automated email from the ASF dual-hosted git repository.
>> 
>> yishayw pushed a commit to branch develop
>> in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
>> 
>> 
>> The following commit(s) were added to refs/heads/develop by this push:
>>    new 00c5b2a  Fix assertType for js
>> 00c5b2a is described below
>> 
>> commit 00c5b2ac31a1bbef87a7d388f1bc80476f6ff187
>> Author: Yishay Weiss <[email protected]>
>> AuthorDate: Tue Oct 27 15:54:49 2020 +0000
>> 
>>   Fix assertType for js
>> ---
>> .../Core/src/main/royale/org/apache/royale/debugging/assertType.as      | 2 
>> +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git 
>> a/frameworks/projects/Core/src/main/royale/org/apache/royale/debugging/assertType.as
>>  
>> b/frameworks/projects/Core/src/main/royale/org/apache/royale/debugging/assertType.as
>> index 647c60f..27c28a2 100644
>> --- 
>> a/frameworks/projects/Core/src/main/royale/org/apache/royale/debugging/assertType.as
>> +++ 
>> b/frameworks/projects/Core/src/main/royale/org/apache/royale/debugging/assertType.as
>> @@ -36,7 +36,7 @@ package org.apache.royale.debugging
>>        COMPILE::JS
>>        {
>>            if(goog.DEBUG)
>> -                assert((obj is type),message);
>> +                console.assert((obj is type),message);
>>        }
>>    }
>> }
>> 
> 

Reply via email to