Skip to content

Commit

Permalink
fix: Context is marked as used if a type is expected
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsDeltin committed Dec 15, 2023
1 parent affe095 commit ff274cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Deltinteger/Deltinteger/Parse/ParseInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public ParseInfo AddVariableTracker(IVariableTracker variableTracker)
CurrentUsageResolver = currentUsageResolver,
SourceUsageResolver = sourceUsageResolver
};
public ParseInfo SetExpectType(CodeType type) => new ParseInfo(this) { ExpectingType = type }.SetExpectingLambda(type);
public ParseInfo SetExpectType(CodeType type) => new ParseInfo(this) { ExpectingType = type, IsUsedAsValue = true }.SetExpectingLambda(type);
public ParseInfo SetReturnType(CodeType type) => new ParseInfo(this) { ReturnType = type };
public ParseInfo SetThisType(IDefinedTypeInitializer typeInitializer) => new ParseInfo(this) { TypeInitializer = typeInitializer };
public ParseInfo SetContextualModifierGroup(VariableModifierGroup modifierGroup) => new ParseInfo(this) { ContextualVariableModifiers = modifierGroup };
Expand Down

0 comments on commit ff274cd

Please sign in to comment.