Solidity — All About Compiler Errors

Jean Cvllr
11 min readApr 8, 2023
image by Etienne Girardet on Unsplash

This article is Part I of the “All About Errors” sub-series.

We will now look in more details at a first broad category of errors in Solidity: errors related to the Solidity compiler, known as “Compile Time Errors” or “Compiler Errors”.

As you will see, the Solidity compiler solc generates different type of errors when compiling Solidity code into bytecode. Each of these relate to different reason making the compiler abort.

Table of Content
- Introduction to Compile Time Errors
- Solc CLI Errors
- Compiler Errors - Overview
- Warnings
- Parser Error
- Docstring Parser Error
- Syntax Error
- Declaration Error
- Type Error
- Unimplemented Feature Error
- Crash Errors

Introduction to Compile Time Errors

Compile time errors, as the name suggests, are errors that occur at the time a Solidity contract is compiled by the solc compiler.

They appear in the IDE (Remix, VS Code…) if your IDE is programmed with some plugins (like Solidity Visual Developer for VS Code) or in the terminal when running the command to compile.

When solc is used to compiler a Solidity smart contract, it takes a .sol file and its content as input to generate an output: the EVM bytecode of the smart contract. But at the time of compilation…

--

--

Jean Cvllr
Jean Cvllr

Written by Jean Cvllr

Smart Contract engineer at @LUKSO. Full Stack Developer. https://github.com/CJ42

Responses (1)