Skip to content

Commit

Permalink
add option to not short circuit in the language server
Browse files Browse the repository at this point in the history
  • Loading branch information
michaellilltokiwa committed Aug 4, 2023
1 parent 067c4e0 commit f50aa96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/dev/flang/ast/Call.java
Original file line number Diff line number Diff line change
Expand Up @@ -2217,7 +2217,7 @@ public Call resolveTypes(Resolution res, AbstractFeature outer)
if (POSTCONDITIONS) ensure
(Errors.count() > 0 || result.typeIfKnown() != Types.t_ERROR);

return result.typeIfKnown() == Types.t_ERROR
return result.typeIfKnown() == Types.t_ERROR && !res._options.isLanguageServer()
? Call.ERROR // short circuit this call
: result;
}
Expand Down
5 changes: 5 additions & 0 deletions src/dev/flang/util/FuzionOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ public Path fuzionHome()
return _fuzionHome;
}

public boolean isLanguageServer()
{
return false;
}


}

Expand Down

0 comments on commit f50aa96

Please sign in to comment.