Skip to content

default default values for DartC #67

@DartBot

Description

@DartBot

This issue was originally filed by [email protected]


foo([x]) {
  print('x = $x');
}

main() {
  foo();
}

In Dartboard leads to:

NoSuchMethodException - receiver: '' function name: '' arguments: []]

In DartVM works fine (output 'x = null')

The holy spec is somewhat unclear on the subj, but "6.2.2 Named Optional Formals" marks default value for optional argument optional, so DartVM behaviour seems reasonable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions