mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-15 14:54:09 +02:00
Fixes for new out-var rules, unassigned variable detection
This commit is contained in:
parent
6878183873
commit
fd3265445d
9 changed files with 56 additions and 30 deletions
|
@ -9363,7 +9363,7 @@ namespace IDE
|
|||
{
|
||||
if (mBuildContext != null)
|
||||
{
|
||||
if (mBuildContext.mScriptContext.mVars.TryGetValue(varName, var value))
|
||||
if (mBuildContext.mScriptContext.mVars.TryGetValue(varName, out value))
|
||||
{
|
||||
if (value.VariantType == typeof(String))
|
||||
{
|
||||
|
|
|
@ -2447,7 +2447,7 @@ namespace IDE
|
|||
if (hasError)
|
||||
mScriptManager.Fail("Unexpected error at line {0} in {1}\n\t", lineIdx + 1, textPanel.mFilePath);
|
||||
else
|
||||
mScriptManager.Fail("Expected error at line {0} in {1} but didn't encounter one\n\t", lineIdx + 1, textPanel.mFilePath);
|
||||
mScriptManager.Fail("Expected error but didn't encounter one at line {0} in {1}\n\t", lineIdx + 1, textPanel.mFilePath);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -475,6 +475,8 @@ namespace IDE.ui
|
|||
{
|
||||
if (val.StartsWith("!", StringComparison.Ordinal))
|
||||
{
|
||||
addr = 0;
|
||||
byteCount = 0;
|
||||
String errorString = scope String();
|
||||
DebugManager.GetFailString(val, evalStr, errorString);
|
||||
IDEApp.sApp.Fail(errorString);
|
||||
|
|
|
@ -2447,7 +2447,7 @@ namespace IDE.ui
|
|||
if (stmtEndChar == '{')
|
||||
offsetLinePos++;
|
||||
}
|
||||
else if (GetStatementRange(toLineStart, .AllowInnerMethodSelect, var stmtStartIdx, var stmtEndIdx, var stmtEndChar) == .Declaration)
|
||||
else if (GetStatementRange(toLineStart, .AllowInnerMethodSelect, out stmtStartIdx, out stmtEndIdx, out stmtEndChar) == .Declaration)
|
||||
{
|
||||
if (stmtEndIdx <= toLineEnd)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue