No worries! Have a good night! -- Josh Tynjala Bowler Hat LLC https://bowlerhat.dev/
On Mon, Jan 26, 2026 at 2:45 PM Harbs <[email protected]> wrote: > Ugh! > > That’s what I get for doing this when it’ past my bedtime… > > I forgot to pull before I built… 🫠 > > I’ll try again in the morning... > > > On Jan 27, 2026, at 12:41 AM, Harbs <[email protected]> wrote: > > > > This is the full list of changes I made to Core, which as enough to > cause the errors when opening my project which uses AsyncTasks. > > > > diff --git > a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/AsyncTask.as > b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/AsyncTask.as > > index 541b3827be..9b92553de1 100644 > > --- > a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/AsyncTask.as > > +++ > b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/AsyncTask.as > > @@ -136,7 +136,7 @@ package org.apache.royale.utils.async > > * @playerversion AIR 2.6 > > * @productversion Royale 0.9.6 > > */ > > - public function done(callback:Function):IAsyncTask{ > > + public function done(callback:(task:IAsyncTask)=>void):IAsyncTask{ > > if(_status == "complete" || _status == "failed"){ > > callback(this); > > return this; > > @@ -158,7 +158,7 @@ package org.apache.royale.utils.async > > * @playerversion AIR 2.6 > > * @productversion Royale 0.9.13 > > */ > > - public function exec(callback:Function):IAsyncTask > > + public function exec(callback:(task:IAsyncTask)=>void):IAsyncTask > > { > > done(callback); > > run(); > > > > > > diff --git > a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/CompoundAsyncTask.as > b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/CompoundAsyncTask.as > > index 55a89368ed..4b9871e199 100644 > > --- > a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/CompoundAsyncTask.as > > +++ > b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/CompoundAsyncTask.as > > @@ -184,12 +184,10 @@ package org.apache.royale.utils.async > > * @langversion 3.0 > > * @productversion Royale 0.9.9 > > */ > > - public static function > execute(tasks:Array,callback:Function,failEarly:Boolean=false):void{ > > + public static function > execute(tasks:Array,callback:(task:IAsyncTask)=>void,failEarly:Boolean=false):void{ > > var task:CompoundAsyncTask = new > CompoundAsyncTask(tasks); > > task.failEarly = failEarly; > > - task.done(function():void{ > > - callback(task); > > - }); > > + task.done(callback); > > task.run(); > > } > > } > > > > > > diff --git > a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/IAsyncTask.as > b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/IAsyncTask.as > > index 9f3565ff14..064c7395b8 100644 > > --- > a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/IAsyncTask.as > > +++ > b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/IAsyncTask.as > > @@ -20,8 +20,8 @@ package org.apache.royale.utils.async > > { > > public interface IAsyncTask > > { > > - function done(callback:Function):IAsyncTask; > > - function exec(callback:Function):IAsyncTask; > > + function done(callback:(task:IAsyncTask)=>void):IAsyncTask; > > + function exec(callback:(task:IAsyncTask)=>void):IAsyncTask; > > function run(data:Object=null):void; > > > > function complete():void; > > > > diff --git > a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/SequentialAsyncTask.as > b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/SequentialAsyncTask.as > > index d5d8cd60c7..f1b160e606 100644 > > --- > a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/SequentialAsyncTask.as > > +++ > b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/SequentialAsyncTask.as > > @@ -83,12 +83,10 @@ package org.apache.royale.utils.async > > * @langversion 3.0 > > * @productversion Royale 0.9.9 > > */ > > - public static function > execute(tasks:Array,callback:Function,failEarly:Boolean=false):void{ > > + public static function > execute(tasks:Array,callback:(task:IAsyncTask)=>void,failEarly:Boolean=false):void{ > > var task:SequentialAsyncTask = new > SequentialAsyncTask(tasks); > > task.failEarly = failEarly; > > - task.done(function():void{ > > - callback(task); > > - }); > > + task.done(callback); > > task.run(); > > } > > } > > > > > > > >> On Jan 27, 2026, at 12:34 AM, Harbs <[email protected]> wrote: > >> > >> Still getting errors: > >> > >> Unexpected exception 'java.lang.NullPointerException' with message > '${exceptionMessage}' at org.apache.royale.compiler.internal.tree.as > .FunctionTypeExpressionNode.parseSignature:195 > >> org.apache.royale.compiler.internal.tree.as > .FunctionTypeExpressionNode.createTypeNodeFromParameterDefinition:246 > >> org.apache.royale.compiler.internal.tree.as > .FunctionTypeExpressionNode.createFromFunctionDefinition:157 > >> > org.apache.royale.compiler.internal.semantics.MethodBodySemanticChecker.checkFormalsVsActuals:1180 > >> > org.apache.royale.compiler.internal.semantics.MethodBodySemanticChecker.checkFunctionCall:1474 > >> > org.apache.royale.compiler.internal.as.codegen.ABCGeneratingReducer.reduce_functionAsMemberExpr:3890 > >> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.action_349:5971 > >> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.dispatchAction:9331 > >> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent:40375 > >> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.dispatchAction:7568 > >> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent:40375 > >> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.dispatchAction:10191 > >> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent:40375 > >> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.reduce:40352 > >> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals:40403 > >> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent:40374 > >> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.reduce:40352 > >> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals:40394 > >> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent:40374 > >> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.reduce:40352 > >> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.burm:40654 > >> > org.apache.royale.compiler.internal.as.codegen.ABCGenerator.generateInstructions:235 > >> > org.apache.royale.compiler.internal.as.codegen.ABCGenerator.generateMethodBodyForFunction:416 > >> > org.apache.royale.compiler.internal.as.codegen.ABCGenerator.generateMethodBodyForFunction:370 > >> > org.apache.royale.compiler.internal.as.codegen.ABCGenerator.generateFunction:272 > >> > org.apache.royale.compiler.internal.as.codegen.ClassDirectiveProcessor.declareFunction:891 > >> > org.apache.royale.compiler.internal.as.codegen.DirectiveProcessor.processNode:218 > >> > org.apache.royale.compiler.internal.as.codegen.DirectiveProcessor.traverse:192 > >> > org.apache.royale.compiler.internal.as.codegen.GlobalDirectiveProcessor.declareClass:462 > >> > org.apache.royale.compiler.internal.as.codegen.DirectiveProcessor.processNode:210 > >> > org.apache.royale.compiler.internal.as.codegen.DirectiveProcessor.traverse:192 > >> > org.apache.royale.compiler.internal.as.codegen.GlobalDirectiveProcessor.declarePackage:488 > >> > org.apache.royale.compiler.internal.as.codegen.DirectiveProcessor.processNode:227 > >> > org.apache.royale.compiler.internal.as.codegen.DirectiveProcessor.traverse:192 > >> > org.apache.royale.compiler.internal.as.codegen.ABCGenerator.generate:126 > >> > org.apache.royale.compiler.internal.units.ASCompilationUnit.handleABCBytesRequest:412 > >> > org.apache.royale.compiler.internal.units.CompilationUnitBase.processABCBytesRequest:876 > >> > org.apache.royale.compiler.internal.units.CompilationUnitBase$4$1.call:313 > >> > org.apache.royale.compiler.internal.units.CompilationUnitBase$4$1.call:309 > >> > org.apache.royale.compiler.internal.units.requests.RequestMaker$1.call:228 > >> > org.apache.royale.compiler.internal.units.requests.RequestMaker$1.call:222 > >> java.util.concurrent.FutureTask.run:264 > >> java.util.concurrent.ThreadPoolExecutor.runWorker:1128 > >> java.util.concurrent.ThreadPoolExecutor$Worker.run:628 > >> java.lang.Thread.run:829 > >> > >>> On Jan 27, 2026, at 12:14 AM, Harbs <[email protected]> wrote: > >>> > >>> Will do. Thanks. > >>> > >>>> On Jan 27, 2026, at 12:07 AM, Josh Tynjala <[email protected]> > wrote: > >>>> > >>>> Please try again with the latest compiler commits. It should be fixed > now. > >>>> > >>>> -- > >>>> Josh Tynjala > >>>> Bowler Hat LLC > >>>> https://bowlerhat.dev/ > >>>> > >>>> > >>>> On Mon, Jan 26, 2026 at 11:34 AM Harbs <[email protected]> wrote: > >>>> > >>>>> Cool. Thanks! > >>>>> > >>>>>> On Jan 26, 2026, at 8:07 PM, Josh Tynjala < > [email protected]> > >>>>> wrote: > >>>>>> > >>>>>> I'll check it out. Looking at where the exception is thrown, I have > a > >>>>>> pretty good idea of what is null and how to go about fixing it. > >>>>>> > >>>>>> -- > >>>>>> Josh Tynjala > >>>>>> Bowler Hat LLC > >>>>>> https://bowlerhat.dev/ > >>>>>> > >>>>>> > >>>>>> On Mon, Jan 26, 2026 at 9:43 AM Harbs <[email protected]> > wrote: > >>>>>> > >>>>>>> I wanted to try out the new typed functions and I’m getting lots of > >>>>>>> errors. Here’s what I tried: > >>>>>>> > >>>>>>> 1. I converted a bunch of function. declarations in Core: > >>>>>>> diff --git > >>>>>>> > >>>>> > a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/object/defineGetter.as > >>>>>>> > >>>>> > b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/object/defineGetter.as > >>>>>>> index 6fb9ce411a..50adfadbbe 100644 > >>>>>>> --- > >>>>>>> > >>>>> > a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/object/defineGetter.as > >>>>>>> +++ > >>>>>>> > >>>>> > b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/object/defineGetter.as > >>>>>>> @@ -28,7 +28,7 @@ package org.apache.royale.utils.object > >>>>>>> * @royalesuppressexport > >>>>>>> */ > >>>>>>> COMPILE::JS > >>>>>>> - public function > >>>>>>> defineGetter(obj:Object,prop:String,getterFunction:Function):void > >>>>>>> + public function > >>>>> defineGetter(obj:Object,prop:String,getterFunction:() > >>>>>>> => *):void > >>>>>>> { > >>>>>>> Object.defineProperty(obj, prop, {"get": getterFunction}); > >>>>>>> } > >>>>>>> > >>>>>>> > >>>>>>> diff --git > >>>>>>> > >>>>> > a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/IAsyncTask.as > >>>>>>> > >>>>> > b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/IAsyncTask.as > >>>>>>> index 9f3565ff14..c6b7402a6d 100644 > >>>>>>> --- > >>>>>>> > >>>>> > a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/IAsyncTask.as > >>>>>>> +++ > >>>>>>> > >>>>> > b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/IAsyncTask.as > >>>>>>> @@ -20,8 +20,8 @@ package org.apache.royale.utils.async > >>>>>>> { > >>>>>>> public interface IAsyncTask > >>>>>>> { > >>>>>>> - function done(callback:Function):IAsyncTask; > >>>>>>> - function exec(callback:Function):IAsyncTask; > >>>>>>> + function done(callback:(task:IAsyncTask) => > >>>>>>> void):IAsyncTask; > >>>>>>> + function exec(callback:(task:IAsyncTask) => > >>>>>>> void):IAsyncTask; > >>>>>>> function run(data:Object=null):void; > >>>>>>> > >>>>>>> function complete():void; > >>>>>>> > >>>>>>> > >>>>>>> diff --git > >>>>>>> > >>>>> > a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/AsyncTask.as > >>>>>>> > >>>>> > b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/AsyncTask.as > >>>>>>> index 541b3827be..47a71323de 100644 > >>>>>>> --- > >>>>>>> > >>>>> > a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/AsyncTask.as > >>>>>>> +++ > >>>>>>> > >>>>> > b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/async/AsyncTask.as > >>>>>>> @@ -136,7 +136,7 @@ package org.apache.royale.utils.async > >>>>>>> * @playerversion AIR 2.6 > >>>>>>> * @productversion Royale 0.9.6 > >>>>>>> */ > >>>>>>> - public function done(callback:Function):IAsyncTask{ > >>>>>>> + public function done(callback:(task:IAsyncTask) => > >>>>> void):IAsyncTask{ > >>>>>>> if(_status == "complete" || _status == "failed"){ > >>>>>>> callback(this); > >>>>>>> return this; > >>>>>>> @@ -158,7 +158,7 @@ package org.apache.royale.utils.async > >>>>>>> * @playerversion AIR 2.6 > >>>>>>> * @productversion Royale 0.9.13 > >>>>>>> */ > >>>>>>> - public function exec(callback:Function):IAsyncTask > >>>>>>> + public function exec(callback:(task:IAsyncTask) => > void):IAsyncTask > >>>>>>> { > >>>>>>> done(callback); > >>>>>>> run(); > >>>>>>> @@ -200,7 +200,7 @@ package org.apache.royale.utils.async > >>>>>>> * Keep references to event listeners for automatic cleanup > >>>>>>> */ > >>>>>>> COMPILE::JS > >>>>>>> - override public function addEventListener(type:String, > >>>>>>> handler:Function, useCapture:Boolean = false, scope:Object = > null):void > >>>>>>> + override public function addEventListener(type:String, > >>>>>>> handler:(ev:Event) => void, useCapture:Boolean = false, > scope:Object = > >>>>>>> null):void > >>>>>>> { > >>>>>>> super.addEventListener(type,handler,useCapture,scope); > >>>>>>> if(!listeners) > >>>>>>> @@ -214,7 +214,7 @@ package org.apache.royale.utils.async > >>>>>>> }); > >>>>>>> } > >>>>>>> COMPILE::SWF > >>>>>>> - override public function addEventListener(type:String, > >>>>>>> listener:Function, useCapture:Boolean = false, priority:int = 0, > >>>>>>> useWeakReference:Boolean = false):void > >>>>>>> + override public function addEventListener(type:String, > >>>>>>> listener:(ev:Event) => void, useCapture:Boolean = false, > priority:int = > >>>>> 0, > >>>>>>> useWeakReference:Boolean = false):void > >>>>>>> { > >>>>>>> if(!listeners) > >>>>>>> { > >>>>>>> 2. I compiled Core > >>>>>>> 3. I opened my project > >>>>>>> 4. I got a bunch of: > >>>>>>> Unexpected exception 'java.lang.NullPointerException' with message > >>>>>>> '${exceptionMessage}' at > org.apache.royale.compiler.internal.tree.as > >>>>>>> .FunctionTypeExpressionNode.parseSignature:195 > >>>>>>> org.apache.royale.compiler.internal.tree.as > >>>>>>> > .FunctionTypeExpressionNode.createTypeNodeFromParameterDefinition:246 > >>>>>>> org.apache.royale.compiler.internal.tree.as > >>>>>>> .FunctionTypeExpressionNode.createFromFunctionDefinition:157 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.semantics.MethodBodySemanticChecker.checkFormalsVsActuals:1180 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.semantics.MethodBodySemanticChecker.checkFunctionCall:1474 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.ABCGeneratingReducer.reduce_functionAsMemberExpr:3890 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.action_349:5971 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.dispatchAction:9331 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent:40375 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.dispatchAction:7568 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent:40375 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.dispatchAction:10191 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent:40375 > >>>>>>> > >>>>>>> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.reduce:40352 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals:40403 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent:40374 > >>>>>>> > >>>>>>> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.reduce:40352 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals:40394 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent:40374 > >>>>>>> > >>>>>>> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.reduce:40352 > >>>>>>> > >>>>>>> > org.apache.royale.compiler.internal.as.codegen.CmcEmitter.burm:40654 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.ABCGenerator.generateInstructions:235 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.ABCGenerator.generateMethodBodyForFunction:416 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.ABCGenerator.generateMethodBodyForFunction:370 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.ABCGenerator.generateFunction:272 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.ClassDirectiveProcessor.declareFunction:891 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.DirectiveProcessor.processNode:218 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.DirectiveProcessor.traverse:192 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.GlobalDirectiveProcessor.declareClass:462 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.DirectiveProcessor.processNode:210 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.DirectiveProcessor.traverse:192 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.GlobalDirectiveProcessor.declarePackage:488 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.DirectiveProcessor.processNode:227 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.as.codegen.DirectiveProcessor.traverse:192 > >>>>>>> > >>>>>>> > org.apache.royale.compiler.internal.as.codegen.ABCGenerator.generate:126 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.units.ASCompilationUnit.handleABCBytesRequest:412 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.units.CompilationUnitBase.processABCBytesRequest:876 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.units.CompilationUnitBase$4$1.call:313 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.units.CompilationUnitBase$4$1.call:309 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.units.requests.RequestMaker$1.call:228 > >>>>>>> > >>>>>>> > >>>>> > org.apache.royale.compiler.internal.units.requests.RequestMaker$1.call:222 > >>>>>>> java.util.concurrent.FutureTask.run:264 > >>>>>>> java.util.concurrent.ThreadPoolExecutor.runWorker:1128 > >>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run:628 > >>>>>>> java.lang.Thread.run:829 > >>>>> > >>>>> > >>> > >> > > > >
