lean4-htt/tests/server_interactive/strInterpSynthError.lean
Garmelon a3cb39eac9
chore: migrate more tests to new test suite (#12809)
This PR migrates most remaining tests to the new test suite. It also
completes the migration of directories like `tests/lean/run`, meaning
that PRs trying to add tests to those old directories will now fail.
2026-03-06 16:52:01 +00:00

30 lines
750 B
Text

/-!
# String interpolation synthesis diagnostic spans
The spans for type-class synthesis errors in interpolated strings to be localized to the
interpolants at which synthesis failure occurs.
-/
structure Foo where
structure Bar where
def foo := Foo.mk
def bar := Bar.mk
instance : ToString Foo := ⟨fun _ => "foo"⟩
example := s!"a {foo} b {bar} c"
--^ collectDiagnostics
--^ collectDiagnostics
--^ collectDiagnostics
example := s!"{bar} a"
--^ collectDiagnostics
--^ collectDiagnostics
--^ collectDiagnostics
example := s!"a {bar}"
--^ collectDiagnostics
--^ collectDiagnostics
--^ collectDiagnostics