Skip to content

using for with explicit function names does not support overloaded functions #13107

Open
@adhusson

Description

@adhusson

Description

When declaring functions to use with a user-defined type, overloaded functions trigger the error "Identifier not found or not unique".

Environment

Solidity 0.8.13, 0.8.14

Steps to Reproduce

pragma solidity ^0.8.13;

type t is uint;

function f(t a) {}
function f(t a, bool b) {}

using {f} for t; // DeclarationError: Identifier not found or not unique.

Suggestion

Allow specifying the overload to use ("using {f(uint)} for t") or always use all overloads with compatible signature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    medium effortDefault level of effortmedium impactDefault level of impactmust have eventuallySomething we consider essential but not enough to prevent us from releasing Solidity 1.0 without it.needs designThe proposal is too vague to be implemented right away

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions