Position after named argument?

By accident when refactoring I ended up with (and boy, do I miss the reorder arguments refactoring):

  DeviceGroupFact(flatDeviceIds = Set(device_A.id), ObjectId.get)

Idea marked the last argument with the error "Position after named argument", but the code still compiled. I thought also that this was illegal. Has this restriction been relaxed or might this be a scalac bug?

Comment actions Permalink

Actually, I didn't check the spec on this one. If you investigate, please update that ticket.

Comment actions Permalink

From 6.6.1 of the 2.8 scala reference (can't find a 2.8.1 reference):

    The named arguments form a suffix of the argument list e1, ..., em, i.e. no positional argument follows a named one.

But, ticket #2488 Positional argument should be allowed after named argument that is in its original position (http://lampsvn.epfl.ch/trac/scala/ticket/2488) was closed 18 months ago.

So i guess the tracker entry you created must stand.


Please sign in to leave a comment.