chore: make Object constructor internal.
This commit is contained in:
parent
1193ca3005
commit
52b270a8d8
2 changed files with 2 additions and 2 deletions
|
@ -248,7 +248,7 @@ namespace Jellyfin.Plugin.SmartPlaylist.Lisp {
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Object : Scalar<object> {
|
public class Object : Scalar<object> {
|
||||||
public Object(object value) : base(value) { }
|
internal Object(object value) : base(value) {}
|
||||||
public static Expression FromBase(object? o) {
|
public static Expression FromBase(object? o) {
|
||||||
if (o == null) {
|
if (o == null) {
|
||||||
return Boolean.FALSE;
|
return Boolean.FALSE;
|
||||||
|
|
|
@ -195,7 +195,7 @@ namespace Tests
|
||||||
public static void ObjectTest() {
|
public static void ObjectTest() {
|
||||||
Executor e = new Executor();
|
Executor e = new Executor();
|
||||||
Expression r;
|
Expression r;
|
||||||
e.environment.Set("o", new Lisp_Object(new O(5, false)));
|
e.environment.Set("o", Lisp_Object.FromBase(new O(5, false)));
|
||||||
r = e.eval("""(haskeys o "i" "b")""");
|
r = e.eval("""(haskeys o "i" "b")""");
|
||||||
Assert.True(((Lisp_Boolean)r).Value());
|
Assert.True(((Lisp_Boolean)r).Value());
|
||||||
r = e.eval("""(getitems o "i" "b")""");
|
r = e.eval("""(getitems o "i" "b")""");
|
||||||
|
|
Loading…
Reference in a new issue