diff options
author | Paul Phillips <paulp@improving.org> | 2012-04-22 05:46:50 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-04-22 06:12:23 -0700 |
commit | 8c95273b70288e4e3a547fa43f2dbdb40a71b9ea (patch) | |
tree | 214e7cb1fb5655f002a58ae8b6b3a60e53e50817 /test/files/scalacheck | |
parent | 3c9c18ddccc17c2b0e62195315ba2abb72d3b761 (diff) | |
download | scala-8c95273b70288e4e3a547fa43f2dbdb40a71b9ea.tar.gz scala-8c95273b70288e4e3a547fa43f2dbdb40a71b9ea.tar.bz2 scala-8c95273b70288e4e3a547fa43f2dbdb40a71b9ea.zip |
Reflection and reification: Names and Symbols.
- Consolidating many islands of name organization. Folds NameManglers
into StdNames. Brings more of the string constants together with similar
constants. Move name manipulation methods which produce TypeNames
into object tpnme rather than nme.
- Starting on MethodSymbolApi, ClassSymbolApi, etc so we can put
sensible methods on sensible entities. This pushed into Definitions,
where I pulled a whole bunch out of the api side (or at least marked
my intention to do so -- too many tests use them to make them easy to
remove) and on the compiler side, returned something more specific than
Symbol a bunch of places.
- Added a number of conveniences to Definitions to make it easier to
get properly typed symbols.
Note: one way in which you might notice having better typed Symbols is
with Sets, which have the annoying property of inferring a type based on
what they've been constructed with and then hard failing when you test
for the presence of a more general type. So this:
val mySet = Set(a, b)
println(mySet(c))
..goes from compiling to not compiling if a and b receive more specific
types (e.g. they are MethodSymbols) and c is a Symbol or ClassSymbol or
whatever. This is easily remedied on a site-by-site basis - create
Set[Symbol](...) not Set(...) - but is an interesting and unfortunate
consequence of type inference married to invariance.
The changes to DummyMirror where things became ??? were driven by the
need to lower its tax; type "Nothing" is a lot more forgiving about changes
than is any specific symbol type.
Diffstat (limited to 'test/files/scalacheck')
0 files changed, 0 insertions, 0 deletions