Skip to content

[X# 3] Error reported on Math.Max() with (U)Int64 value #1791

@cpyrgas

Description

@cpyrgas

Following compiles with no errors when compiling for Net 4, but reports 2 errors for Net 10:

FUNCTION Start( ) AS VOID
	LOCAL n64 AS INT64
	LOCAL u64 AS UINT64
	n64 := Math.Max(0,n64) // error XS0121: The call is ambiguous between the following methods or properties: 'System.Math.Max(int64, int64)' and 'System.Math.Max(nint, nint)'
	u64 := Math.Max(0,u64) // error XS0121: The call is ambiguous between the following methods or properties: 'System.Math.Max(nint, nint)' and 'System.Math.Max(uint64, uint64)'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions