E2056 Syntax Errors

Syntax

statements cannot sit at file scope; move this into do main()

When this occurs

This error is triggered when: statements cannot sit at file scope; move this into do main()

Example error message

error[E2056]: statements cannot sit at file scope; move this into do main()

How to fix

Review the error message and check your code at the indicated location. The message describes what went wrong — fix the underlying issue it identifies.

Related errors

No related errors.