You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wave uses fun for function declarations. A source file beginning with fn main() {} currently reports only an unexpected top-level identifier and lists every valid declaration kind.
Expected diagnostic
The error should point at fn and include a direct suggestion such as:
did you mean `fun`?
The compiler must not silently rewrite the source.
Scope
Detect the exact identifier fn where a top-level declaration is expected.
Preserve the normal unexpected-token diagnostic for other identifiers.
Provide the same message and span in human and JSON error formats.
Add a regression for fn main() {} and a control case for an unrelated identifier.
Activity
Improve source diagnostics and reject recursive inline storage (#986)