The documentation generated from the following code
module Foo(T)
end
class Bar(T)
include Foo(Bar)
include Foo(Bar(T))
end
shows that Bar includes Foo(Bar(T)) twice:
However the two includes have different semantics, which are evident when Foo is a module like Comparable: (this happens to most collection types in the standard library, actually)
class Bar(T)
# all Bars are comparable with each other
include Comparable(Bar)
# Bar(T) is only comparable with Bar(T); mixing generic type arguments is not allowed
include Comparable(Bar(T))
end
Thus the links generated from types should omit the type vars if a generic type argument is non-instantiated. This applies especially to the type lists on the top of each page (included / extended modules, subclasses, including types).
The documentation generated from the following code
shows that
Bar
includesFoo(Bar(T))
twice:However the two includes have different semantics, which are evident when
Foo
is a module likeComparable
: (this happens to most collection types in the standard library, actually)Thus the links generated from types should omit the type vars if a generic type argument is non-instantiated. This applies especially to the type lists on the top of each page (included / extended modules, subclasses, including types).