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 b5b79aa commit 7c9ff46Copy full SHA for 7c9ff46
crates/icrate/tests/set.rs
@@ -294,3 +294,16 @@ fn test_iter_minimal_retains() {
294
expected.dealloc += 1;
295
expected.assert_current();
296
}
297
+
298
+/// This currently works, but we should figure out a way to disallow it!
299
+#[test]
300
+#[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSConnection"))]
301
+#[allow(deprecated)]
302
+fn invalid_generic() {
303
+ let something_interior_mutable = unsafe { Foundation::NSConnection::defaultConnection() };
304
+ let set = NSSet::from_id_slice(&[Foundation::NSArray::from_id_slice(&[
305
+ something_interior_mutable,
306
+ ])]);
307
+ let _ = set.get_any().unwrap().get(0).unwrap();
308
+ // something_interior_mutable.setAbc(...)
309
+}
0 commit comments