MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / duplicate_fn

Function duplicate_fn

cranelift/reader/src/parser.rs:3339–3356  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3337
3338 #[test]
3339 fn duplicate_fn() {
3340 let ParseError {
3341 location,
3342 message,
3343 is_warning,
3344 } = Parser::new(
3345 "function %blocks() system_v {
3346 sig0 = ()
3347 fn0 = %foo sig0
3348 fn0 = %foo sig0",
3349 )
3350 .parse_function()
3351 .unwrap_err();
3352
3353 assert_eq!(location.line_number, 4);
3354 assert_eq!(message, "duplicate entity: fn0");
3355 assert!(!is_warning);
3356 }
3357
3358 #[test]
3359 fn comments() {

Callers

nothing calls this directly

Calls 2

parse_functionMethod · 0.80
newFunction · 0.50

Tested by

no test coverage detected