[#543] | project: compiler | priority: low | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Sean | _ | noise | 2006-03-08 17:07:09.0 | |
subject | val and object type check diferently | |||
code |
In scala.tools.nsc.Main object generator extends DocGenerator { val global : compiler.type = compiler; val outdir = command.settings.outdir.value; }; generator.process(run.units); vs. val generator = new DocGenerator { val global : compiler.type = compiler; val outdir = command.settings.outdir.value; }; generator.process(run.units); |
|||
what happened | The object generator type checks, while the val generator does not:Severity Path Resource De5cr1p7-haX0Rion Location Creation Time Id Error scala/src/compiler/scala/tools/nsc Main.scala type mismatch; found : scala.Iterator[compiler.CompilationUnit] required: scala.Iterator[generator.global.CompilationUnit] line 68 March 8, 2006 5:06:23 PM 16748 |
|||
what expected | They should either both fail or both pass, I think, unless there is something I'm not getting about how object and val are different. | |||
[back to overview] |
Sean edited on 2006-08-08 14:18:19.0 |