diff options
author | Piotr Fusik <piotr@fusion-lang.org> | 2024-02-28 16:25:39 +0100 |
---|---|---|
committer | Piotr Fusik <piotr@fusion-lang.org> | 2024-02-28 16:25:39 +0100 |
commit | fdadd2203c27f37028fc9a69d1bee8ff6b785661 (patch) | |
tree | 772c3915b3fa746d7ae0796ec03fa021e42e6c20 | |
parent | d45913aeb83607e88217aba0c38355a4b9e828b0 (diff) |
[cleanup] Remove an unused variable.
-rw-r--r-- | AST.fu | 2 | ||||
-rw-r--r-- | libfut.cpp | 3 | ||||
-rw-r--r-- | libfut.cs | 2 | ||||
-rw-r--r-- | libfut.js | 3 |
4 files changed, 4 insertions, 6 deletions
@@ -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 @@ -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() { @@ -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 @@ -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; } } |