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
traitAxisCompanion {
sealedtraitFormatobjectFormat {
caseobjectDecimalextendsFormatcaseobjectIntegerextendsFormat
}
}
objectAxisextendsAxisCompanionclassAxis {
importAxis._deftest( f: Format ) = f match {
caseFormat.Integer=>"Int"
}
}
Note that Axis#test is inexhaustive. The underlying problem is that when children of Format are to be located, symbols for AxisCompanion.Format.Decimal and .Integer are obtained and are subsequently ousted in refine, as they are not subtypes of Axis.Format. The paths of .Decimal and .Format should be adapted to the path of their parent type.
@liufengyun - this was discovered when implementing intersection-based useless pattern checks in #3454. I found the cause for it, but as I'm running out of time and I'd prefer to focus on typechecker integration, I'm simply raising the issue here.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
The following code compiles without any warnings:
Note that
Axis#test
is inexhaustive. The underlying problem is that when children ofFormat
are to be located, symbols forAxisCompanion.Format.Decimal
and.Integer
are obtained and are subsequently ousted inrefine
, as they are not subtypes ofAxis.Format
. The paths of.Decimal
and.Format
should be adapted to the path of their parent type.@liufengyun - this was discovered when implementing intersection-based useless pattern checks in #3454. I found the cause for it, but as I'm running out of time and I'd prefer to focus on typechecker integration, I'm simply raising the issue here.
The text was updated successfully, but these errors were encountered: