Fix abstract casts on Haxe 4.2

This commit is contained in:
Joshua Granick
2021-03-10 12:44:20 -08:00
parent 8a5487f212
commit 2c563b7809
11 changed files with 11 additions and 4 deletions

View File

@@ -41,6 +41,7 @@ import lime.utils.Int32Array;
```
**/
@:forward
@:transitive
#if (lime_doc_gen)
abstract OpenGLES3RenderContext(NativeOpenGLRenderContext) from NativeOpenGLRenderContext
{

View File

@@ -33,6 +33,7 @@ import lime._internal.backend.native.NativeOpenGLRenderContext;
**/
@:access(lime.graphics.RenderContext)
@:forward()
@:transitive
abstract OpenGLRenderContext(NativeOpenGLRenderContext) from NativeOpenGLRenderContext to NativeOpenGLRenderContext
{
@:from private static function fromRenderContext(context:RenderContext):OpenGLRenderContext

View File

@@ -6,6 +6,7 @@ import lime.graphics.opengl.*;
import lime.utils.DataPointer;
@:access(lime.graphics.RenderContext)
@:forward()
@:transitive
abstract WebGL2RenderContext(HTML5WebGL2RenderContext) from HTML5WebGL2RenderContext to HTML5WebGL2RenderContext
{
public inline function bufferData(target:Int, srcData:Dynamic, usage:Int, ?srcOffset:Int, ?length:Int):Void

View File

@@ -18,6 +18,7 @@ import lime.utils.UInt8Array;
var convert:BGRA = color; // 0x003388FF
```
**/
@:transitive
abstract ARGB(#if (flash && !lime_doc_gen) Int #else UInt #end) from Int to Int from UInt to UInt
{
private static var a16:Int;

View File

@@ -18,6 +18,7 @@ import lime.utils.UInt8Array;
var convert:ARGB = color; // 0xFF883300
```
**/
@:transitive
abstract BGRA(#if (flash && !lime_doc_gen) Int #else UInt #end) from Int to Int from UInt to UInt
{
private static var a16:Int;

View File

@@ -114,7 +114,7 @@ abstract ColorMatrix(Float32Array) from Float32Array to Float32Array
**/
public function copyFrom(other:ColorMatrix):Void
{
this.set(other);
this.set(cast other);
}
/**

View File

@@ -232,7 +232,7 @@ abstract Matrix4(Float32Array) from Float32Array to Float32Array
**/
public function copyFrom(other:Matrix4):Void
{
this.set(other);
this.set(cast other);
}
/**

View File

@@ -19,6 +19,7 @@ import lime.utils.UInt8Array;
```
**/
@:allow(lime.math)
@:transitive
abstract RGBA(#if (flash && !lime_doc_gen) Int #else UInt #end) from Int to Int from UInt to UInt
{
private static var __alpha16:UInt32Array;

View File

@@ -568,7 +568,7 @@ class OpenALAudioContext
AL.sourceQueueBuffers(source, nb, buffers);
}
public function sourceUnqueueBuffer(source:ALSource):Int
public function sourceUnqueueBuffer(source:ALSource):ALBuffer
{
return AL.sourceUnqueueBuffer(source);
}

View File

@@ -1304,7 +1304,7 @@ class AL
var res = NativeCFFI.lime_al_source_unqueue_buffers(source, 1);
return res[0];
#else
return 0;
return cast 0;
#end
}

View File

@@ -6,6 +6,7 @@ typedef ArrayBuffer = #if haxe4 js.lib.ArrayBuffer #else js.html.ArrayBuffer #en
import haxe.io.Bytes;
@:forward
@:transitive
abstract ArrayBuffer(Bytes) from Bytes to Bytes
#if doc_gen from Dynamic to Dynamic
#end