code-d
code-d copied to clipboard
Function contract lacking syntax highlighting
When using an in
contract for a function, the expression inside the parentheses is not highlighted if it is on the same line as the {
bracket.
When it's on a line before it it however does highlight correctly.
When out
is used instead of in
(eg out(; i > 0)
), no highlighting is applied in either case.
module app;
import std.stdio;
void test(int i)
in (i > 0) {
writeln(i);
}
// or
void test(int i)
in (i > 0)
{
writeln(i);
}
// or
void test(int i)
out (; i > 0) {
writeln(i);
}
// or
int test(int i)
out (r; r > 0) {
writeln(i);
return i;
}
void main() {
test(2);
}
hm in seems to work fine here in either case, out doesn't have any highlighting.
Interesting, it works for me now too. Can't imagine why it didn't last week, apologies for the inconvenience.
keeping this open for the out highlighting and inconsistent parentheses
I've forgotten to make notes about that . . . but yeah, several parts of my code have strange indentation, if that's what you mean.
I have once again encountered this. I however have no idea how to replicate the issue.
send full code