Aladdin - Scala Bugtracking
[#763] project: compiler priority: low category: bug
submitter assigned to status date submitted
Nikolay Martin fixed 2006-09-24 17:00:01.0
subject [contrib #217] Application doesn't allow dependent result type
code
trait Foo { type T; def apply() : T }
val f : Foo = new Foo { type T = int; def apply() = 42 }
f()
what happened
:5 error: malformed type: line0$object.Foo#T
  val line2 = f()
what expected f.apply() and (f:f.type)() work properly, and give the return type as f.T The spec states that f(args) should be equivalent to f.apply(args), and that's not the case here.
[back to overview]
Changes of this bug report
Nikolay  edited on  2006-09-24 17:00:32.0
Transferred from the contributions and assigned to Martin
Martin  edited on  2006-10-05 17:34:36.0