Aladdin - Scala Bugtracking
[#1034] project: compiler priority: low category: bug
submitter assigned to status date submitted
Nikolay Martin fixed 2007-04-02 09:48:27.0
subject [contrib #416] Type application for values is broken
code
object Terminal {
  def apply[a] : a => unit = { a => () }
  val i0 = Terminal.apply[int]
  val i1 = (Terminal)[int]
  val i2 = Terminal[int]
}
what happened
  • i1 fails with error: ';' expected but '[' found
  • i2 fails with error: object Terminal of type Terminal.type does not take type parameters
what expected

According to section 6.6 of the spec, both should be valid and equal to i0.

[back to overview]
Changes of this bug report
Nikolay  edited on  2007-04-02 09:49:03.0
contribution #416
Stephane  edited on  2007-04-17 15:11:15.0
Martin  edited on  2007-05-29 19:14:25.0