Skip to content

Commit 0acdf37

Browse files
authored
Merge pull request #356 from scratchcpp/fix_top_level_block_warning
Fix #255: Do not compile top level shadow blocks
2 parents fa7bd15 + 2feea55 commit 0acdf37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/engine/internal/engine.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ void Engine::compile()
109109
Compiler compiler(this, target.get());
110110
auto blocks = target->blocks();
111111
for (auto block : blocks) {
112-
if (block->topLevel()) {
112+
if (block->topLevel() && !block->shadow()) {
113113
auto section = blockSection(block->opcode());
114114
if (section) {
115115
auto script = std::make_shared<Script>(target.get(), this);

0 commit comments

Comments
 (0)