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

Method singleton_type

cranelift/codegen/meta/src/cdsl/typevar.rs:123–130  ·  view source on GitHub ↗

If the associated typeset has a single type return it. Otherwise return None.

(&self)

Source from the content-addressed store, hash-verified

121
122 /// If the associated typeset has a single type return it. Otherwise return None.
123 pub fn singleton_type(&self) -> Option<ValueType> {
124 let type_set = self.get_typeset();
125 if type_set.size() == 1 {
126 Some(type_set.get_singleton())
127 } else {
128 None
129 }
130 }
131
132 /// Get the free type variable controlling this one.
133 pub fn free_typevar(&self) -> Option<TypeVar> {

Callers 3

get_constraintFunction · 0.80
free_typevarMethod · 0.80
verify_polymorphicFunction · 0.80

Calls 3

get_typesetMethod · 0.80
get_singletonMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected