PlayScriptRedux / playscript

PlayScript is an ActionScript compatible compiler and Flash compatible runtime that runs in the Mono/.NET environment
Other
17 stars 9 forks source link

pscorlib Regression #74

Closed sushihangover closed 9 years ago

sushihangover commented 9 years ago

[ERROR] FATAL UNHANDLED EXCEPTION: Mono.CSharp.InternalErrorException: ../pscorlib/flash/net/URLLoader.play(389,20): flash.net.URLLoader.doLocalLoad() ---> System.IndexOutOfRangeException: Array index is out of range.

Unhandled Exception:
Mono.CSharp.InternalErrorException: ../pscorlib/flash/net/URLLoader.play(389,20): flash.net.URLLoader.doLocalLoad() ---> System.IndexOutOfRangeException: Array index is out of range.
  at Mono.CSharp.Convert.ExplicitReferenceConversion (Mono.CSharp.Expression source, Mono.CSharp.TypeSpec source_type, Mono.CSharp.TypeSpec target_type, Mono.CSharp.ResolveContext opt_ec) [0x00000] in <filename unknown>:0
  at Mono.CSharp.Convert.ExplicitConversionCore (Mono.CSharp.ResolveContext ec, Mono.CSharp.Expression expr, Mono.CSharp.TypeSpec target_type, Location loc) [0x00000] in <filename unknown>:0
  at Mono.CSharp.Convert.ExplicitConversion (Mono.CSharp.ResolveContext ec, Mono.CSharp.Expression expr, Mono.CSharp.TypeSpec target_type, Location loc) [0x00000] in <filename unknown>:0
  at Mono.CSharp.Expression.Error_ValueCannotBeConvertedCore (Mono.CSharp.ResolveContext ec, Location loc, Mono.CSharp.TypeSpec target, Boolean expl) [0x00000] in <filename unknown>:0
  at Mono.CSharp.Expression.Error_ValueCannotBeConverted (Mono.CSharp.ResolveContext ec, Mono.CSharp.TypeSpec target, Boolean expl) [0x00000] in <filename unknown>:0
  at Mono.CSharp.Convert.ImplicitConversionRequired (Mono.CSharp.ResolveContext ec, Mono.CSharp.Expression source, Mono.CSharp.TypeSpec target_type, Location loc) [0x00000] in <filename unknown>:0
  at Mono.CSharp.Assign.ResolveConversions (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0
  at Mono.CSharp.Assign.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0
  at Mono.CSharp.SimpleAssign.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec, ResolveFlags flags) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at Mono.CSharp.Method.Emit () [0x00000] in <filename unknown>:0
  at Mono.CSharp.TypeDefinition.Emit () [0x00000] in <filename unknown>:0
  at Mono.CSharp.ClassOrStruct.Emit () [0x00000] in <filename unknown>:0
  at Mono.CSharp.Class.Emit () [0x00000] in <filename unknown>:0
  at Mono.CSharp.TypeDefinition.EmitContainer () [0x00000] in <filename unknown>:0
  at Mono.CSharp.TypeContainer.EmitContainer () [0x00000] in <filename unknown>:0
  at Mono.CSharp.NamespaceContainer.EmitContainer () [0x00000] in <filename unknown>:0
  at Mono.CSharp.TypeContainer.EmitContainer () [0x00000] in <filename unknown>:0
  at Mono.CSharp.NamespaceContainer.EmitContainer () [0x00000] in <filename unknown>:0
  at Mono.CSharp.TypeContainer.EmitContainer () [0x00000] in <filename unknown>:0
  at Mono.CSharp.ModuleContainer.EmitContainer () [0x00000] in <filename unknown>:0
  at Mono.CSharp.AssemblyDefinition.Emit () [0x00000] in <filename unknown>:0
  at Mono.CSharp.AssemblyDefinitionStatic.Emit () [0x00000] in <filename unknown>:0
  at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0
sushihangover commented 9 years ago

New Test: ./as/test-as-FunctionStyleCast.as to track future regressions

./as/test-as-FunctionStyleCast.as...    REGRESSION (SUCCESS -> COMPILATION ERROR)
Mono.CSharp.InternalErrorException: ./as/test-as-FunctionStyleCast.as(28,32): _root.Foo.Main() ---> System.IndexOutOfRangeException: Array index is out of range.
  at Mono.CSharp.Convert.ExplicitReferenceConversion (Mono.CSharp.Expression source, Mono.CSharp.TypeSpec source_type, Mono.CSharp.TypeSpec target_type, Mono.CSharp.ResolveContext opt_ec) [0x00369] in /Users/administrator/Documents/Code/playscript/playscriptredux/playscript/mcs/mcs/convert.cs:2412
// Compiler options: -psstrict+
package {
    import System.*;
    import System.IO.*;
    import System.Collections.Generic.*;
    import flash.utils.*;

    public class Foo {

        public class LoaderHandler {

            public var sourceExt:String;
            public var targetExt:String;
            public var handler:Function;
            public var matcher:Function;

            public function LoaderHandler(sourceExt:String, targetExt:String, handler:Function, matcher:Function)
            {
                this.sourceExt = sourceExt;
                this.targetExt = targetExt;
                this.handler = handler;
                this.matcher = matcher;
            }
        }

        private static var loaderHandler:LoaderHandler;

        public static function Main():int {

if (loaderHandler != null) {
var callback:Func.<String,ByteArray,ByteArray> = Func.<String,ByteArray,ByteArray>(loaderHandler.handler);

}

        return 0;
        }
    }
}
sushihangover commented 9 years ago

commit 00e6dd5a8536696455150c36464b80e364409533 Author: SushiHangover sushihangover@outlook.com Date: Tue Aug 25 11:25:21 2015 -0700

Fixes #74 : ActionScript function casts