Cannot infer type for type parameter "T", seems to be compiler issue

Hi @Nazeeh21, why am I facing this issue?
Seems to be let test_contract = abi(Test, teste_contract_id.unwrap().into()); this issue
Cannot infer type for type parameter “T”, seems to be compiler issue

// Type implementation
//
impl<T> Option<T> {
    // Querying the contained values
    //
    /// Returns whether the option is the `Some` variant.
    ///
    /// # Returns
    ///
    /// * [bool] - Returns `true` if the option is `Some`, otherwise `false`.
    ///
    /// # Examples
    ///
    /// ```sway
    /// fn foo() {
    ///     let x: Option<u32> = Some(2);
    ///     assert(x.is_some());
    ///
    ///     let x: Option<u32> = None;
    ///     assert(!x.is_some());
    /// }
    /// ```
    pub fn is_some(self) -> bool {
        match self {
            Self::Some(_) => true,
            _ => false,
        }
    }

Error:

.forc/git/checkouts/std-9be0d6062747ea7/2156bfbbee01ffb85bfca2aae8f185f8e7c715a4/sway-lib-std/src/option.sw:106:6

Cannot infer type for type parameter "T".

This is my fuelup show:

Default host: x86_64-unknown-linux-gnu
fuelup home: /home/test/.fuelup

Installed toolchains
--------------------
latest-x86_64-unknown-linux-gnu (default)
nightly-2024-05-28-x86_64-unknown-linux-gnu
testnet-x86_64-unknown-linux-gnu

active toolchain
----------------
latest-x86_64-unknown-linux-gnu (default)
  forc : 0.64.0
    - forc-client
      - forc-deploy : 0.64.0
      - forc-run : 0.64.0
    - forc-crypto : 0.64.0
    - forc-debug : 0.64.0
    - forc-doc : 0.64.0
    - forc-fmt : 0.64.0
    - forc-lsp : 0.64.0
    - forc-tx : 0.64.0
    - forc-wallet : 0.9.1
  fuel-core : 0.36.0
  fuel-core-keygen : 0.36.0

fuels versions
--------------
forc : 0.66
forc-wallet : 0.66.5

Seems to be compiler issue: Why is this Compiling error happening for v0.64?

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.