修复了一些bug

This commit is contained in:
2025-11-26 17:58:30 +08:00
parent 2f24d94db2
commit 88b0edfe6a
4 changed files with 18 additions and 3 deletions

View File

@@ -32,7 +32,7 @@ namespace Convention.RScript
else
internalData = Activator.CreateInstance(type);
}
else if (type == typeof(object) || type == value.GetType())
else if (type == typeof(object) || type.IsAssignableFrom(value.GetType()))
internalData = value;
else
internalData = Convert.ChangeType(value, type);