summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Fusik <piotr@fusion-lang.org>2024-02-28 16:25:39 +0100
committerPiotr Fusik <piotr@fusion-lang.org>2024-02-28 16:25:39 +0100
commitfdadd2203c27f37028fc9a69d1bee8ff6b785661 (patch)
tree772c3915b3fa746d7ae0796ec03fa021e42e6c20
parentd45913aeb83607e88217aba0c38355a4b9e828b0 (diff)
[cleanup] Remove an unused variable.
-rw-r--r--AST.fu2
-rw-r--r--libfut.cpp3
-rw-r--r--libfut.cs2
-rw-r--r--libfut.js3
4 files changed, 4 insertions, 6 deletions
diff --git a/AST.fu b/AST.fu
index 5711b29..206af26 100644
--- a/AST.fu
+++ b/AST.fu
@@ -1054,7 +1054,7 @@ public abstract class FuNamedValue : FuSymbol
{
internal FuExpr#? TypeExpr;
internal FuExpr#? Value;
- public bool IsAssignableStorage() => this.Type is FuStorageType storage && !(this.Type is FuArrayStorageType) && this.Value is FuLiteralNull;
+ public bool IsAssignableStorage() => this.Type is FuStorageType && !(this.Type is FuArrayStorageType) && this.Value is FuLiteralNull;
}
public abstract class FuMember : FuNamedValue
diff --git a/libfut.cpp b/libfut.cpp
index 619a430..517892d 100644
--- a/libfut.cpp
+++ b/libfut.cpp
@@ -1970,8 +1970,7 @@ bool FuFloatingType::isAssignableFrom(const FuType * right) const
bool FuNamedValue::isAssignableStorage() const
{
- const FuStorageType * storage;
- return (storage = dynamic_cast<const FuStorageType *>(this->type.get())) && !dynamic_cast<const FuArrayStorageType *>(this->type.get()) && dynamic_cast<const FuLiteralNull *>(this->value.get());
+ return dynamic_cast<const FuStorageType *>(this->type.get()) && !dynamic_cast<const FuArrayStorageType *>(this->type.get()) && dynamic_cast<const FuLiteralNull *>(this->value.get());
}
FuMember::FuMember()
{
diff --git a/libfut.cs b/libfut.cs
index e5c4beb..0f1311a 100644
--- a/libfut.cs
+++ b/libfut.cs
@@ -2554,7 +2554,7 @@ namespace Fusion
internal FuExpr Value;
- public bool IsAssignableStorage() => this.Type is FuStorageType storage && !(this.Type is FuArrayStorageType) && this.Value is FuLiteralNull;
+ public bool IsAssignableStorage() => this.Type is FuStorageType && !(this.Type is FuArrayStorageType) && this.Value is FuLiteralNull;
}
public abstract class FuMember : FuNamedValue
diff --git a/libfut.js b/libfut.js
index 07f6c4d..2ebc804 100644
--- a/libfut.js
+++ b/libfut.js
@@ -2596,8 +2596,7 @@ export class FuNamedValue extends FuSymbol
isAssignableStorage()
{
- let storage;
- return (storage = this.type) instanceof FuStorageType && !(this.type instanceof FuArrayStorageType) && this.value instanceof FuLiteralNull;
+ return this.type instanceof FuStorageType && !(this.type instanceof FuArrayStorageType) && this.value instanceof FuLiteralNull;
}
}