We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24cec5c commit a894fe6Copy full SHA for a894fe6
crates/bevy_mod_scripting_core/src/extractors.rs
@@ -233,4 +233,22 @@ mod test {
233
app.finish();
234
app.update();
235
}
236
+
237
+ #[test]
238
+ #[should_panic]
239
+ pub fn check_with_world_panics_when_not_only_top_level_param() {
240
+ let system_fn = |mut guard: WithWorldGuard<(ResMut<Res>, Query<&'static Comp>)>,
241
+ _res: ResMut<Res>| {
242
+ let (_guard, (_res, _entity)) = guard.get_mut();
243
+ };
244
245
+ let mut app = bevy::app::App::new();
246
+ app.add_systems(Update, system_fn);
247
+ app.insert_resource(Res);
248
+ app.world_mut().spawn(Comp);
249
250
+ app.cleanup();
251
+ app.finish();
252
+ app.update();
253
+ }
254
0 commit comments