1- @[suggest_for String.test0, String.test1, String.test2]
1+ @[suggest_for String.test0 String.test1 String.test2]
22public def String.foo (x: String) := x.length + 1
33
4- @[suggest_for test1, String.test2]
4+ @[simp, grind, suggest_for test1 String.test2]
55public def String.bar (x: String) := x.length + 1
66
7- @[suggest_for String.test1, String.test2]
7+ @[suggest_for String.test1 String.test2, inline ]
88public def String.baz (x: String) := x.length + 1
99
10- @[suggest_for String.test2]
10+ @[suggest_for String.test2, always_inline ]
1111public def otherFoo (x: String) := x.length + 1
1212
1313@[suggest_for String.test2]
@@ -96,7 +96,7 @@ attribute [suggest_for Foo.Bar.first] Bar.one
9696end Foo
9797
9898namespace Foo.Bar
99- attribute [suggest_for Foo.Bar.second, Foo.more] Bar.two
99+ attribute [suggest_for Foo.Bar.second Foo.more] Bar.two
100100
101101@[suggest_for Foo.Bar.toStr]
102102def toString : Foo.Bar → String
@@ -105,7 +105,7 @@ def toString : Foo.Bar → String
105105 | .three => "three"
106106end Foo.Bar
107107
108- attribute [suggest_for Foo.Bar.third, Foo.more] Foo.Bar.three
108+ attribute [suggest_for Foo.Bar.third Foo.more] Foo.Bar.three
109109
110110@[suggest_for Foo.Bar.toNum]
111111def Foo.Bar.toNat : Foo.Bar → Nat
@@ -247,3 +247,34 @@ Hint: Perhaps you meant `Bar.one` in place of `Bar.first`:
247247#guard_msgs in
248248#eval Bar.first
249249end Foo
250+
251+
252+ inductive MyBool where | tt | ff
253+
254+ attribute [suggest_for MyBool.true] MyBool.tt
255+ attribute [suggest_for MyBool.false] MyBool.ff
256+
257+ @[suggest_for MyBool.not]
258+ def MyBool.swap : MyBool → MyBool
259+ | tt => ff
260+ | ff => tt
261+
262+ /--
263+ error: Unknown constant `MyBool.true`
264+
265+ Hint: Perhaps you meant `MyBool.tt` in place of `MyBool.true`:
266+ M̵y̵B̵o̵o̵l̵.̵t̵r̵u̵e̵M̲y̲B̲o̲o̲l̲.̲t̲t̲
267+ -/
268+ #guard_msgs in
269+ example := MyBool.true
270+
271+ /--
272+ error: Invalid field `not`: The environment does not contain `MyBool.not`, so it is not possible to project the field `not` from an expression
273+ MyBool.tt
274+ of type `MyBool`
275+
276+ Hint: Perhaps you meant one of these in place of `MyBool.not`:
277+ [ apply ] `MyBool.swap`: MyBool.tt.swap
278+ -/
279+ #guard_msgs in
280+ example := MyBool.tt.not
0 commit comments