diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2013-02-01 14:31:32 +0100 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2013-02-03 21:08:34 +0100 |
commit | f3cdf146709e0dd98533ee77e8ca2566380cb932 (patch) | |
tree | 54333250b47e1a744cb0b2454ea955bd9586b4c9 /test/files/neg/t3234.check | |
parent | 7e836f83e2930755f5d6b896a140909eb686289d (diff) | |
download | scala-f3cdf146709e0dd98533ee77e8ca2566380cb932.tar.gz scala-f3cdf146709e0dd98533ee77e8ca2566380cb932.tar.bz2 scala-f3cdf146709e0dd98533ee77e8ca2566380cb932.zip |
Fix context for type checking early initializers
Before:
scala> class A { class C extends { val x: A = this } with AnyRef }
<console>:7: error: type mismatch;
found : A.this.C
required: A
class A { class C extends { val x: A = this } with AnyRef }
^
Note that the same thing is necessary and already done in Namers (see
def createNamer). The whole logic of when and how to create contexts
should be factored out and reused in Namer and Typer.
(
My Hobby [1]: detecting compiler by just looking at its soruce
[1] http://www.explainxkcd.com/wiki/index.php?title=Category:My_Hobby
)
Diffstat (limited to 'test/files/neg/t3234.check')
0 files changed, 0 insertions, 0 deletions