-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Operator overloading type inference Error #7150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The code, which does type inference in expressions has a explicit path for primitive types (probably for speedup), which handles this kind of inference wrong. If you remove the explicit handling of primitive types, this specific example resolves the type correctly. Even if we get rid of the explicit built-in type handling, there are cases where types are resolved incorrectly for operator overloads: #5685. This is (I think) an issue with chalk. |
I'd still like to keep the built-in handling, and rather fix it so it doesn't apply in those wrong cases. |
I am encountering a similar issue caused by an overloaded multicall.call().await?;
The defintion of the pub async fn call<D: Detokenize>(&self) -> Result<D, ContractError<M>> {
...
} The catch is that the async fn call(
&self,
tx: &TransactionRequest,
block: Option<BlockNumber>,
) -> Result<Bytes, Self::Error> {
...
} These types are from ethers-rs. |
That's not the same issue. Can you make a separate report please? |
Oh, sorry @flodiebold. Will do. |
when I run those codes on

rustc: stable-x86_64-unknown-linux-gnu - rustc 1.49.0
OS: window wsl
RA is update-to-date
RA type inference like
And the real type of res should be wrapper_f64
The text was updated successfully, but these errors were encountered: