我有这个问题,我不明白它来自哪里。代码:
class applicationFrameworksManager =
object(this)
val mutable frameworks = []
method add_framework name = ()(* if not (List.mem name frameworks) then frameworks <- List.append frameworks [name]; *)
method get_frameworks = frameworks
结尾;;
和错误:
Error: Some type variables are unbound in this type:
class applicationFrameworksManager :
object
val mutable frameworks : 'a list
method add_framework : 'b -> unit
method get_frameworks : 'a list
end
The method add_framework has type 'b -> unit where 'b is unbound
制作:* [genobjc.cmx] 错误 2
有人可以帮忙吗?我可以绑定什么?谢谢。我会在这个类中添加很多字符串,最后我只想得到唯一的字符串。