summary refs log blame commit diff stats
path: root/.travis.yml
blob: dde02d478a96fb39a1cd0ee50219c022b812b1e5 (plain) (tree)
"scenario_")) return; trace(9991, "transform") << "--- check if recipe " << caller.name << " has any dependency-injection mistakes" << end(); for (int index = 0; index < SIZE(caller.steps); ++index) { const instruction& inst = caller.steps.at(index); if (inst.operation < MAX_PRIMITIVE_RECIPES) continue; for (int i = 0; i < SIZE(inst.ingredients); ++i) { const reagent& ing = inst.ingredients.at(i); if (!is_literal(ing) || ing.name != "0") continue; const recipe& callee = get(Recipe, inst.operation); if (!callee.has_header) continue; if (i >= SIZE(callee.ingredients)) continue; const reagent& expected_ing = callee.ingredients.at(i); for (int j = 0; j < SIZE(Real_hardware_types); ++j) { if (*Real_hardware_types.at(j) == *expected_ing.type) raise << maybe(caller.name) << "'" << inst.original_string << "': only 'main' can pass 0 into a " << to_string(expected_ing.type) << '\n' << end(); } } } } :(scenarios transform) :(scenario warn_on_using_real_screen_directly_in_non_main_recipe) % Hide_errors = true; def foo [ print 0, 34 ] +error: foo: 'print 0, 34': only 'main' can pass 0 into a (address screen)