argotorg / argotorg/solidity

`using for` with explicit function names does not support overloaded functions

Open
#13,107 1 comment 1 reaction 0 assignees View on GitHub
medium effort medium impact must have eventually needs design
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
2d 19h
Merged PRs (30d)
29

Description

## 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
```solidity
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.

Contributor guide

Open the contributing guide

Research direction

Start with the Solidity reproduction using `type t is uint`, the overloaded `f` declarations, and `using {f} for t`. Compare the two proposed resolutions—explicit overload selection such as `using {f(uint)} for t` or allowing all compatible overloads—and define the intended behavior before locating the compiler entry point and adding coverage for the accepted syntax.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, solidity
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.