@@ -30,6 +30,7 @@ interface EtsType : TypeName, CommonType {
3030 fun visit (type : EtsIntersectionType ): R
3131 fun visit (type : EtsGenericType ): R
3232 fun visit (type : EtsAliasType ): R
33+ fun visit (type : EtsEnumValueType ): R
3334
3435 // Primitive
3536 fun visit (type : EtsBooleanType ): R
@@ -62,6 +63,7 @@ interface EtsType : TypeName, CommonType {
6263 override fun visit (type : EtsIntersectionType ): R = defaultVisit(type)
6364 override fun visit (type : EtsGenericType ): R = defaultVisit(type)
6465 override fun visit (type : EtsAliasType ): R = defaultVisit(type)
66+ override fun visit (type : EtsEnumValueType ): R = defaultVisit(type)
6567
6668 override fun visit (type : EtsBooleanType ): R = defaultVisit(type)
6769 override fun visit (type : EtsNumberType ): R = defaultVisit(type)
@@ -371,3 +373,17 @@ data class EtsFunctionType(
371373 return visitor.visit(this )
372374 }
373375}
376+
377+ data class EtsEnumValueType (
378+ val signature : EtsFieldSignature ,
379+ val constant : EtsConstant ? = null ,
380+ ): EtsType {
381+ override val typeName: String
382+ get() = signature.name
383+
384+ override fun toString (): String = typeName
385+
386+ override fun <R > accept (visitor : EtsType .Visitor <R >): R {
387+ return visitor.visit(this )
388+ }
389+ }
0 commit comments