The constructor previously had used a parameter &
I realized I had mistakenly left the variable type address as a parameter for the Test (contract) constructor which I didn't provide in the test. After removing the parameter (which isn't used in the constructor) the test passes.

function Test(address) public {...

It worked in remix (no errors/warnings) as I expected so I didn't catch it before copying the code over to an editor.

Does remix ignore bad parameters when it deploys a contract? Is there a way to catch this in remix?

TAG REQUEST: I noticed that there isn't a tag for 'remix', the Ethereum solidity IDE. Solidity is a valid tag but remix doesn't exist. The dedicated Ethereum exchange site has this tag but shouldn't it be available here as well for programming-related questions? A simple search for it shows there are enough questions to warrant one. There are tags for many IDEs & text editors but not one for remix. I don't have the rep or I'd create it myself.
– Don PeatFeb 2 at 22:25

1 Answer
1

Warning: Unused function parameter. Remove or comment out the variable name to silence this warning. function demo(address _unused) public pure returns (uint8) {

But it seems that if you are only providing variable type without a name, then remix just ignores it:

Is there a way to catch this in remix?

It might be possible to catch such thing in the assembly if the value of the nameless variable was stored on stack, but this is pretty deep dive into how Solidity code is compiled and might not fit the purpose of just testing.