|
Scala example source code file (context.scala)
The Scala context.scala source codeclass Context { object symwrap extends SymbolWrapper { val context: Context.this.type = Context.this } object typewrap extends TypeWrapper { val context: Context.this.type = Context.this } object symbols extends symwrap.Symbols; object types extends typewrap.Types; } abstract class SymbolWrapper { val context: Context; import context._; class Symbols { self: context.symbols.type => abstract class Symbol { def typ: types.Type; def sym: Symbol = typ.sym; } } } abstract class TypeWrapper { val context: Context; import context._; class Types { self: context.types.type => abstract class Type { def sym: symbols.Symbol; def typ: Type = sym.typ; } } } Other Scala examples (source code examples)Here is a short list of links related to this Scala context.scala source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.