The definitions of "result" objects are the same. However, the "result" of Usage compiles, while "result" of Definition does not.
The whole effect is very unstable when regarding the circumstances. For example, incremental compilation under IntelliJ IDEA may report successful compilation of the otherwise buggy code when the previous compilation was OK.
The text was updated successfully, but these errors were encountered:
Maxim Buzdalov (MaxBuzz) said:
The precise compilation error is:
Bug.scala:10:error: kinds of the typearguments (Bug.Definition.InSeq) do not conform to the expected kinds of the typeparameters (typeW).
Bug.Definition.InSeq'stypeparametersdo not matchtypeW's expected parameters:
<none> is invariant, but typeY2 is declared covariant
<none>'s bounds<notype> are stricter than typeX2's declared bounds >:Nothing<:Any, <none>'s bounds<notype> are stricter than typeY2's declared bounds >:Nothing<:Anyvalresult=Definition.ofType[Definition.InSeq]
one error found