Skip to content

Local function parameters appear to be entered in wrong scope. #388

Closed
@rakudrama

Description

@rakudrama

The error message below complains that the formal is a duplicate definition - is it being entered into the wrong scope?

bug7.dart:
main() {
  tag(tag, s) => s === null ? '' : '$tag$s';
  print('${tag('x=', 8)}');
}

$ frogsh --enable_type_checks bug7.dart
bug7.dart:2:7: error: duplicate name "tag"
  tag(tag, s) => s === null ? '' : '$tag$s';
      ^^^
compilation failed with 1 errors
$ dart_bin --enable_type_checks --warning_as_error bug7.dart
x=8
$

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions