Skip to content

native operators overload can return arrays #685

Open
@YashasSamaga

Description

@YashasSamaga

Issue description:

Native operator overloads can specify an array return type. They should have the same semantics as non-native operator overloads. The compiler fails to diagnose it.

Minimal complete verifiable example (MCVE):

This compiles:

native Float:[10]operator+(Float:a, Float:b) = 0;
main () { }

This doesn't:

Float:[10]operator-(Float:a, Float:b) { }
main () { }

Workspace Information:

  • Compiler version: 3.10.10
  • Command line arguments provided (or sampctl version): pawncc main.pwn
  • Operating System: Ubuntu 20.04

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions