Skip to content

Error Squiggle when copy-pasting example code into Visual Studio Code #37

Description

@f-and

Error

Upon clean install of cspec, following the explanation in the README.md file, and including the required header files for the example file copied from the previous file, Visual Studio Code (with C/C++ extensions installed) detects the error:

argument of type "void" is incompatible with parameter of type "Runnable"C/C++(167)

Though this error is only aesthetic, as the file compiles correctly and the tests run as expected.

Steps to reproduce it

  • Clean install of cspec
  • Copy full example off README.md into a .c file.
  • Check Intellisense's error

Things attempted to fix the error:

  • Copy the replaced text (__describe("Hello world", ({ void __$__()) into the file.
  • Change Intellisense's version of the compiler
  • Switched from GCC to CLang and back
  • Tested in different computers

Attached a screenshot of the error in question, the second error comes from not detecting the first one as a correct structure, so it doesn't matter for the initial issue.

2023-04-05-19:56:45-screenshot

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