Skip to content

Commit

Permalink
Add ValType override to ScopeReference
Browse files Browse the repository at this point in the history
  • Loading branch information
out-of-phaze committed Oct 31, 2024
1 parent 7939a42 commit d2d09b4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions DMCompiler/DM/Expressions/Dereference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,12 @@ internal sealed class ScopeReference(Location location, DMExpression expression,
])
) {
public override DreamPath? Path => Expression.Path;
public override DMComplexValueType ValType {
get {
TryAsConstant(out var constant);
return constant is not null ? constant.ValType : dmVar.ValType;
}
}

public override string GetNameof(DMObject dmObject) => dmVar.Name;

Expand Down

0 comments on commit d2d09b4

Please sign in to comment.