Skip to content

Commit fe6c708

Browse files
committed
check_adhoc for inspect
1 parent 70cb479 commit fe6c708

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

crates/compiler/solve/src/ability.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,13 @@ impl ObligationCache {
304304

305305
Symbol::BOOL_EQ => Some(DeriveEq::is_derivable(self, abilities_store, subs, var)),
306306

307+
Symbol::INSPECT_INSPECT_ABILITY => Some(DeriveInspect::is_derivable(
308+
self,
309+
abilities_store,
310+
subs,
311+
var,
312+
)),
313+
307314
_ => None,
308315
};
309316

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
app "test" provides [main] to "./platform"
22

33
main = Inspect.toInspector 7 |> Inspect.apply (Inspect.init {}) |> Inspect.toDbgStr
4-
# ^^^^^^^^^^^^^^^^^^^ Inspect#Inspect.toInspector(32): Bool -[[Inspect.dbgBool(43)]]-> Inspector DbgFormatter
4+
# ^^^^^^^^^^^^^^^^^^^ Inspect#Inspect.toInspector(32): I64 -[[Inspect.dbgI64(54)]]-> Inspector DbgFormatter

crates/compiler/uitest/tests/ability/specialize/inspect/opaque_derived.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ app "test" provides [main] to "./platform"
33
Op := U8 implements [Inspect]
44

55
main = Inspect.toInspector (@Op 1u8)
6-
# ^^^^^^^^^^^^^^^^^^^ Inspect#Inspect.toInspector(32): Op -[[] + f:Inspect.opaque(15):1]-> Inspector f where f implements InspectFormatter
6+
# ^^^^^^^^^^^^^^^^^^^ Op#Inspect.toInspector(3): Op -[[#Op_toInspector(3)]]-> Inspector f where f implements InspectFormatter
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
app "test" provides [main] to "./platform"
22

33
main = Inspect.toInspector 7u8 |> Inspect.apply (Inspect.init {}) |> Inspect.toDbgStr
4-
# ^^^^^^^^^^^^^^^^^^^ Inspect#Inspect.toInspector(32): Bool -[[Inspect.dbgBool(43)]]-> Inspector DbgFormatter
4+
# ^^^^^^^^^^^^^^^^^^^ Inspect#Inspect.toInspector(32): U8 -[[Inspect.dbgU8(47)]]-> Inspector DbgFormatter

0 commit comments

Comments
 (0)