Skip to content

Commit

Permalink
fix/mitigate hover bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mmews committed Apr 17, 2024
1 parent 5c37c3c commit f967a10
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,13 @@ TypeRef processFunctionExpression(RuleEnvironment G, FunctionExpression funExpr,
InferenceContext infCtx, ASTMetaInfoCache cache) {
TFunction fun = (TFunction) funExpr.getDefinedType(); // types builder will have created this already

if (!isPoly(funExpr)) { // funExpr has declared types on all fpars and explicitly declared return type
if (fun == null) {
// on hovering fun might be null TODO: investigate
return TypeRefsFactory.eINSTANCE.createUnknownTypeRef();
}

if (!isPoly(funExpr)) {
// funExpr has declared types on all fpars and explicitly declared return type
// can't use xsemantics here, because it would give us a DeferredTypeRef
// return ts.type(G, funExpr).getValue();
FunctionTypeExpression funTE = TypeUtils.createFunctionTypeExpression(null, emptyList(), fun.getFpars(),
Expand Down

0 comments on commit f967a10

Please sign in to comment.