Skip to content

Cannot declare type-bound operators using type aliases #16669

@alaviss

Description

@alaviss

Example

type
  FImpl = object
  
  F = FImpl
  
proc `=copy`*(a: var F, b: F) {.error.}

Current Output

test.nim(6, 1) Error: signature for '=copy' must be proc[T: object](x: var T; y: T)

Additional Information

$ nim -v
Nim Compiler Version 1.5.1 [Linux: amd64]
Compiled at 2021-01-05
Copyright (c) 2006-2020 by Andreas Rumpf

git hash: 2c2baa9fad1d144c42baf30ed004decdf8bb0483
active boot switches: -d:release -d:nimUseLinenoise

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