Skip to content

two regular expressions in the same comprehension breaks #101

@jurgenvinju

Description

@jurgenvinju

In the code below Rascal complains about a redeclared variable n, but only if the second regular expression is there (/rascal/ := f). A nested comprehension for the same computation works nicely.

rascal>{ <toInt(n), f> | /\s*<n:[0-9]+>\s*<f:\S+>/ <- raw, /rascal/ := f}
|stdin:///|(64,1,<1,64>,<1,65>): Redeclared variable: n

rascal>{<x,y> | <x,y> <- { <toInt(n), f> | /\s*<n:[0-9]+>\s*<f:\S+>/ <- raw}, /rascal/ := y}
rel[int, str]: {
  <1,"/unstable-updates/plugins/rascal_eclipse_0.5.2.201209211516.jar">,

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions