()
| 809 | |
| 810 | #[test] |
| 811 | fn test_user_callable_shadows_upcall() { |
| 812 | let key = SymbolKey::from("SHARED"); |
| 813 | let builtin_md = |
| 814 | CallableMetadataBuilder::new("SHARED").with_return_type(ExprType::Boolean).test_build(); |
| 815 | let mut upcalls_map = HashMap::new(); |
| 816 | upcalls_map.insert(key, builtin_md); |
| 817 | |
| 818 | let mut global = GlobalSymtable::new(upcalls_map); |
| 819 | let user_md = |
| 820 | CallableMetadataBuilder::new("SHARED").with_return_type(ExprType::Integer).test_build(); |
| 821 | global.declare_user_callable(&VarRef::new("shared", None), user_md).unwrap(); |
| 822 | |
| 823 | let found = global.get_callable(&SymbolKey::from("shared")).unwrap(); |
| 824 | assert_eq!(Some(ExprType::Integer), found.return_type()); |
| 825 | } |
| 826 | |
| 827 | #[test] |
| 828 | fn test_get_callable_not_found() { |
nothing calls this directly
no test coverage detected