diff --git a/core/shared/src/main/scala/sigma/reflection/ReflectionData.scala b/core/shared/src/main/scala/sigma/reflection/ReflectionData.scala index cdab5d5be7..01949b89ff 100644 --- a/core/shared/src/main/scala/sigma/reflection/ReflectionData.scala +++ b/core/shared/src/main/scala/sigma/reflection/ReflectionData.scala @@ -1,6 +1,7 @@ package sigma.reflection import sigma._ +import sigma.ast.{SCollectionType, SOption, STuple, SType} import sigma.data.RType import scala.collection.compat.immutable.ArraySeq @@ -463,4 +464,28 @@ object ReflectionData { ) ) } + + registerClassEntry(classOf[SCollectionType[_]], + constructors = Array( + mkConstructor(Array(classOf[SType])) { args => + new SCollectionType(args(0).asInstanceOf[SType]) + } + ) + ) + + registerClassEntry(classOf[SOption[_]], + constructors = Array( + mkConstructor(Array(classOf[SType])) { args => + new SOption(args(0).asInstanceOf[SType]) + } + ) + ) + + registerClassEntry(classOf[STuple], + constructors = Array( + mkConstructor(Array(classOf[IndexedSeq[_]])) { args => + new STuple(args(0).asInstanceOf[IndexedSeq[SType]]) + } + ) + ) } diff --git a/interpreter/shared/src/main/scala/sigmastate/InterpreterReflection.scala b/interpreter/shared/src/main/scala/sigmastate/InterpreterReflection.scala index 2b304eba17..217903a619 100644 --- a/interpreter/shared/src/main/scala/sigmastate/InterpreterReflection.scala +++ b/interpreter/shared/src/main/scala/sigmastate/InterpreterReflection.scala @@ -381,14 +381,6 @@ object InterpreterReflection { ) } - registerClassEntry(classOf[SCollectionType[_]], - constructors = Array( - mkConstructor(Array(classOf[SType])) { args => - new SCollectionType(args(0).asInstanceOf[SType]) - } - ) - ) - { val clazz = SGlobalMethods.getClass registerClassEntry(clazz, methods = Map( @@ -402,22 +394,6 @@ object InterpreterReflection { ) } - registerClassEntry(classOf[SOption[_]], - constructors = Array( - mkConstructor(Array(classOf[SType])) { args => - new SOption(args(0).asInstanceOf[SType]) - } - ) - ) - - registerClassEntry(classOf[STuple], - constructors = Array( - mkConstructor(Array(classOf[IndexedSeq[_]])) { args => - new STuple(args(0).asInstanceOf[IndexedSeq[SType]]) - } - ) - ) - registerClassEntry(classOf[SigmaAnd], constructors = Array( mkConstructor(Array(classOf[Seq[_]])) { args =>