Skip to content

[X# 3] Problems with PTR type in Net 10 #1793

@cpyrgas

Description

@cpyrgas

Following snippets from the runtime, reporting errors when compiling for Net 10 (no errors when compiling for Net 4):

FUNCTION Empty(uValue AS PTR) AS LOGIC
    RETURN (uValue == NULL_PTR) // error XS0034: Operator '==' is ambiguous on operands of type 'ptr' and 'nint'

DEFINE F_ERROR :=  IntPtr{-1}

FUNCTION Start() AS VOID
LOCAL hfTo      AS PTR
? hfTo == (IntPtr) F_ERROR // error XS0034: Operator '==' is ambiguous on operands of type 'ptr' and 'nint'

LOCAL uValue AS USUAL
uValue := UIntPtr.Zero // error XS0457: Can't convert from 'usual' to 'nuint'. The possible conversions found are 'usual.implicit operator byte(usual)' and 'usual.implicit operator decimal(usual)'. You should try an explicit conversion.
local i64 := (UIntPtr)uValue as UIntPtr

Metadata

Metadata

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions