Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10247 from lrytz/t12702-pending
Fixes scala/bug#12702
- Loading branch information
Showing
4 changed files
with
50 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
warning: 1 feature warning; re-run with -feature for details | ||
IOS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
object Test { | ||
trait MFSS[X <: MFSS[_]] | ||
trait CS extends MFSS[CS] | ||
trait MFI { type ST } | ||
case class MFSD[S](mFI: MFI {type ST = S}) | ||
case object IOS extends MFI { type ST = CS } | ||
type SD = MFSD[S] forSome { | ||
type S <: MFSS[S] | ||
} | ||
def bad(sd: SD) = sd.mFI match { | ||
case ios: IOS.type => println(ios) | ||
} | ||
def main(args: Array[String]): Unit = { | ||
val x = MFSD(IOS) | ||
bad(x) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters