mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-11-25 05:22:52 +00:00
fix: the block is assumed to be used in expressions (#1668)
This commit is contained in:
parent
84c211c7eb
commit
b56ba42984
5 changed files with 36 additions and 0 deletions
10
crates/tinymist-query/src/fixtures/lint/return_loop3.typ
Normal file
10
crates/tinymist-query/src/fixtures/lint/return_loop3.typ
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#let mul-mat(..matrices) = {
|
||||
matrices = matrices.pos()
|
||||
let out = matrices.remove(0)
|
||||
for matrix in matrices {
|
||||
out = for i in range(m) {
|
||||
(i,)
|
||||
}
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
#let get-op(offset, op) = {
|
||||
if op == none {
|
||||
op = if offset < 0 { "<=" } else { ">=" }
|
||||
}
|
||||
|
||||
return op
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
source: crates/tinymist-query/src/analysis.rs
|
||||
expression: "JsonRepr::new_redacted(result, &REDACT_LOC)"
|
||||
input_file: crates/tinymist-query/src/fixtures/lint/return_loop3.typ
|
||||
---
|
||||
{}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
source: crates/tinymist-query/src/analysis.rs
|
||||
expression: "JsonRepr::new_redacted(result, &REDACT_LOC)"
|
||||
input_file: crates/tinymist-query/src/fixtures/lint/return_partial_if.typ
|
||||
---
|
||||
{}
|
||||
Loading…
Add table
Add a link
Reference in a new issue