Created
June 11, 2013 17:21
-
-
Save gkossakowski/5758834 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// fails to compile with: | |
//Cakey.scala:7: error: overriding value platform in trait SymbolLoaders of type Platform{type SymbolLoader = GlobalSymbolLoaders.this.SymbolLoader}; | |
// value platform has incompatible type | |
// val platform: ThisPlatform = Global.this.platform | |
// ^ | |
//one error found | |
class Global { | |
type ThisPlatform = Platform { | |
type SymbolLoader = Global.this.loaders.SymbolLoader | |
} | |
val platform: ThisPlatform = ??? | |
class GlobalSymbolLoaders extends SymbolLoaders { | |
val platform: ThisPlatform = Global.this.platform | |
} | |
val loaders: GlobalSymbolLoaders = ??? | |
} | |
trait SymbolLoaders { | |
class SymbolLoader | |
val platform: Platform { | |
type SymbolLoader = SymbolLoaders.this.SymbolLoader | |
} | |
} | |
trait Platform { | |
type SymbolLoader <: SymbolLoaders#SymbolLoader | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment