dfinity / motoko

Simple high-level language for writing Internet Computer canisters
Apache License 2.0
505 stars 97 forks source link

feat: check restriction on main actor before type checking #4714

Closed crusso closed 8 hours ago

crusso commented 4 days ago

Improve the error message for compiled code that contains illegal top-level declarations in the main program.

c.f. https://forum.dfinity.org/t/misplaced-await-and-misplaced-async/34479

github-actions[bot] commented 2 days ago

Comparing from 8557a308f1126217f2a87a610a4ceda5a31b09e3 to 095a78fac312839fd6dc4bae5fa595cacf5e48d0: The produced WebAssembly code seems to be completely unchanged.