Fix type register visibility. Add a few more examples

This commit is contained in:
jonathandturner
2016-03-03 11:08:34 -05:00
parent 13c718c794
commit 3dea40a9f7
4 changed files with 57 additions and 1 deletions

View File

@@ -313,7 +313,7 @@ impl Engine {
}
}
fn register_type<T: Clone+Any>(&mut self) {
pub fn register_type<T: Clone+Any>(&mut self) {
fn clone_helper<T: Clone>(t:T)->T { t.clone() };
&(clone_helper as fn(T)->T).register(self, "clone");