vsl-lang/VSL

Ensure no mixed top-level expressions with `func main` (include in decl.)

Closed this issue · 0 comments

Ensure no mixed top-level expressions with func main (include in decl.). This does not include constant expressions (must be declared const with same constraints as public const as described in #51).

const a = 1
const b = a // OK
const a = 1
const b = a // Error

public func main(args: String[]) { ... }
let a = 1 // Error (FIX-IT available)

public func main(args: String[]) { ... }
const a = f() // Error
public func main(args: String[]) { ... }