Skip to content

Commit

Permalink
fix + test
Browse files Browse the repository at this point in the history
  • Loading branch information
amylizzle committed May 23, 2024
1 parent d81e7a7 commit 0e784be
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Content.Tests/DMProject/Tests/Expression/InferredType.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/proc/RunTest()
var/matrix/M1 = new()
var/matrix/M2 = new()

(M1 * M2).Multiply(1)

var/list/test = list(M1,M2)
(locate(/matrix) in test).Multiply(1)
1 change: 1 addition & 0 deletions DMCompiler/DM/Expressions/Binary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ internal abstract class BinaryOp(Location location, DMExpression lhs, DMExpressi
protected DMExpression LHS { get; } = lhs;
protected DMExpression RHS { get; } = rhs;
public override DMComplexValueType ValType => LHS.ValType;
public override bool PathIsFuzzy => true;
}

#region Simple
Expand Down
1 change: 1 addition & 0 deletions DMCompiler/DM/Expressions/Builtins.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ public override void EmitPushValue(DMObject dmObject, DMProc proc) {
sealed class Locate : DMExpression {
private readonly DMExpression _path;
private readonly DMExpression? _container;
public override bool PathIsFuzzy => true;

public Locate(Location location, DMExpression path, DMExpression? container) : base(location) {
_path = path;
Expand Down

0 comments on commit 0e784be

Please sign in to comment.