mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-17 23:08:40 +02:00
Better nonconst diagnostic messages.
This commit is contained in:
@@ -204,7 +204,7 @@ int DoFset(ParsePtr p)
|
|||||||
}
|
}
|
||||||
existing = FindUserFunc(DBufValue(&buf));
|
existing = FindUserFunc(DBufValue(&buf));
|
||||||
if (existing) {
|
if (existing) {
|
||||||
nonconst_debug(!existing->is_constant, tr("Function definition considered non-constant because of context"));
|
nonconst_debug(!existing->is_constant, tr("Potential function definition considered non-constant because of context"));
|
||||||
existing->is_constant = 0;
|
existing->is_constant = 0;
|
||||||
}
|
}
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
|
|||||||
@@ -622,7 +622,7 @@ int DoSet (Parser *p)
|
|||||||
}
|
}
|
||||||
var = FindVar(DBufValue(&buf), 0);
|
var = FindVar(DBufValue(&buf), 0);
|
||||||
if (var) {
|
if (var) {
|
||||||
nonconst_debug(var->nonconstant, tr("Variable assignment considered non-constant because of context"));
|
nonconst_debug(var->nonconstant, tr("Potential variable assignment considered non-constant because of context"));
|
||||||
var->nonconstant = 1;
|
var->nonconstant = 1;
|
||||||
}
|
}
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
|
|||||||
@@ -16450,7 +16450,7 @@ FSET f(x) '1990-01-01'
|
|||||||
IF today() < '1990-01-01'
|
IF today() < '1990-01-01'
|
||||||
../tests/test.rem(1547): Non-constant built-in function `today' makes expression non-constant
|
../tests/test.rem(1547): Non-constant built-in function `today' makes expression non-constant
|
||||||
FSET f(x) '2025-12-31'
|
FSET f(x) '2025-12-31'
|
||||||
../tests/test.rem(1548): Function definition considered non-constant because of context
|
../tests/test.rem(1548): Potential function definition considered non-constant because of context
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
set a f(1)
|
set a f(1)
|
||||||
@@ -16461,7 +16461,7 @@ SET a 1
|
|||||||
IF today() < '1990-01-01'
|
IF today() < '1990-01-01'
|
||||||
../tests/test.rem(1555): Non-constant built-in function `today' makes expression non-constant
|
../tests/test.rem(1555): Non-constant built-in function `today' makes expression non-constant
|
||||||
SET a 2
|
SET a 2
|
||||||
../tests/test.rem(1556): Variable assignment considered non-constant because of context
|
../tests/test.rem(1556): Potential variable assignment considered non-constant because of context
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
dump -c a
|
dump -c a
|
||||||
@@ -24864,6 +24864,8 @@ TRANSLATE "Not setting $OnceFile: Already processed a reminder with a ONCE claus
|
|||||||
TRANSLATE "OMIT: UNTIL not allowed; did you mean THROUGH?" ""
|
TRANSLATE "OMIT: UNTIL not allowed; did you mean THROUGH?" ""
|
||||||
TRANSLATE "OMITFUNC counts as a non-constant expression" ""
|
TRANSLATE "OMITFUNC counts as a non-constant expression" ""
|
||||||
TRANSLATE "POP-OMIT-CONTEXT at %s:%d matches PUSH-OMIT-CONTEXT in different file: %s:%d" ""
|
TRANSLATE "POP-OMIT-CONTEXT at %s:%d matches PUSH-OMIT-CONTEXT in different file: %s:%d" ""
|
||||||
|
TRANSLATE "Potential function definition considered non-constant because of context" ""
|
||||||
|
TRANSLATE "Potential variable assignment considered non-constant because of context" ""
|
||||||
TRANSLATE "Reading `%s': Found in cache" ""
|
TRANSLATE "Reading `%s': Found in cache" ""
|
||||||
TRANSLATE "Reading `%s': Opening file on disk" ""
|
TRANSLATE "Reading `%s': Opening file on disk" ""
|
||||||
TRANSLATE "Reading `-': Reading stdin" ""
|
TRANSLATE "Reading `-': Reading stdin" ""
|
||||||
|
|||||||
Reference in New Issue
Block a user