Skip to content

forge-std/Test.sol incompatible with solidity version 0.6.12 #754

@sdajklfw389

Description

@sdajklfw389

I do see a similar error was fixed in here : #217

My forge-std is the latest

My forge version:

forge Version: 1.4.4-stable
Commit SHA: 05794498bf47257b144e2e2789a1d5bf8566be0e
Build Timestamp: 2025-11-03T23:44:21.031788094Z (1762213461)
Build Profile: maxperf

My forge-std version:

{
  "name": "forge-std",
  "version": "1.11.0",
  "description": "Forge Standard Library is a collection of helpful contracts and libraries for use with Forge and Foundry.",
  "homepage": "https://book.getfoundry.sh/forge/forge-std",
  "bugs": "https://github.com/foundry-rs/forge-std/issues",
  "license": "(Apache-2.0 OR MIT)",
  "author": "Contributors to Forge Standard Library",
  "files": [
    "src/**/*"
  ],
  "repository": {
    "type": "git",
    "url": "https://github.com/foundry-rs/forge-std.git"
  }
}

My computer OS:

Ubuntu 22.04

Project here:

https://github.com/sdajklfw389/ForgeStdError/blob/master/test/TestError.t.sol

My code is only one test file without code, just inherit test from Test.sol.

// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;

import {Test} from "forge-std/Test.sol";

contract TestError is Test {
    function testExample() public {
    }
}

and when i run forge test it has this error:

[⠊] Compiling...
[⠑] Compiling 20 files with Solc 0.6.12
[⠘] Solc 0.6.12 finished in 645.45ms
Error: Compiler run failed:
Error: Unimplemented feature (/solidity/libsolidity/codegen/CompilerUtils.cpp:420):Encoding type "struct StdInvariant.FuzzInterface memory[] memory" not yet implemented.

But forge-std/Test.sol has these lines:

// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2 <0.9.0;

pragma experimental ABIEncoderV2;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions