You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Welcome to Scala2.12.0 (JavaHotSpot(TM) 64-BitServerVM, Java1.8.0_102).
Type in expressions for evaluation. Ortry:help.
scala>traitInvariantContainer[Value0] {
|typeValue=Value0| }
defined traitInvariantContainer
scala>typeValueOf[Container<:InvariantContainer[_]] = container.Value forSome { valcontainer:Container }
warning: there was one feature warning; for details, enable `:setting -feature' or `:replay -feature'
defined typealiasValueOf
scala>defintIsValueOfIntContainer(x: Int):ValueOf[InvariantContainer[Int]] = x
intIsValueOfIntContainer: (x: Int)ValueOf[InvariantContainer[Int]]
scala>typeOptionValueOf[Container<:InvariantContainer[_]] =Option[ValueOf[Container]]
defined typealiasOptionValueOf
scala>defoptionIntIsOptionValueOfIntContainer(x: Option[Int]):OptionValueOf[InvariantContainer[Int]] = x
optionIntIsOptionValueOfIntContainer: (x: Option[Int])OptionValueOf[InvariantContainer[Int]]
scala>typeInlineOptionValueOf[Container<:InvariantContainer[_]] =Option[container.Value forSome { valcontainer:Container }]
warning: there was one feature warning; for details, enable `:setting -feature' or `:replay -feature'
defined typealiasInlineOptionValueOf
scala>defoptionIntIsInlineOptionValueOfIntContainer(x: Option[Int]):InlineOptionValueOf[InvariantContainer[Int]] = x
<console>:13:error: typemismatch;
found : Option[Int]
required: InlineOptionValueOf[InvariantContainer[Int]]
(which expands to) Option[Int[]]
defoptionIntIsInlineOptionValueOfIntContainer(x: Option[Int]):InlineOptionValueOf[InvariantContainer[Int]] = x
^
optionIntIsInlineOptionValueOfIntContainer should not error because InlineOptionValueOf is simply an inline version of OptionValueOf. I expect InlineOptionValueOf behaves the same as OptionValueOf.
The text was updated successfully, but these errors were encountered:
optionIntIsInlineOptionValueOfIntContainer
should not error becauseInlineOptionValueOf
is simply an inline version ofOptionValueOf
. I expectInlineOptionValueOf
behaves the same asOptionValueOf
.The text was updated successfully, but these errors were encountered: