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

Function duplicate_block

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

Source from the content-addressed store, hash-verified

3242
3243 #[test]
3244 fn duplicate_block() {
3245 let ParseError {
3246 location,
3247 message,
3248 is_warning,
3249 } = Parser::new(
3250 "function %blocks() system_v {
3251 block0:
3252 block0:
3253 return 2",
3254 )
3255 .parse_function()
3256 .unwrap_err();
3257
3258 assert_eq!(location.line_number, 3);
3259 assert_eq!(message, "duplicate entity: block0");
3260 assert!(!is_warning);
3261 }
3262
3263 #[test]
3264 fn number_of_blocks() {

Callers

nothing calls this directly

Calls 2

parse_functionMethod · 0.80
newFunction · 0.50

Tested by

no test coverage detected