Skip to content

NamedOp::name should always return scoped names. #1496

@aborgna-q

Description

@aborgna-q
// Consider a noop operation
op: Optype = prelude::Noop.to_extension_op().into()

// This returns the fully scoped name 
assert_eq!(<op as NamedOp>::name(), "prelude.Noop");

// But the same operation on the noop definition returns something different
assert_eq!(<NoopDef as NamedOp>::name(), "Noop");

// So the name can't be used as an unique id
assert_ne!(op.name(), NoopDef.name());

Since we expect names to be used as unique identifiers for the functions, they should always include the extension ids.

Metadata

Metadata

Assignees

Labels

breaking-changeChanges that break semverbugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions