fix interaction between actions called inline and #number actions; fixes #140

This commit is contained in:
Michal Moskal 2015-04-22 14:30:59 -07:00
Родитель 21a9066b7a
Коммит b89f975c5e
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -194,6 +194,7 @@ module TDev.AST
{
var visibleRecordFields:StringMap<boolean> = {}
var hashActions:StringMap<boolean> = {}
var seenAct:StringMap<boolean> = {}
var nameIdx = 0
var preciseStrings:StringMap<boolean> = {}
var problems = ""
@ -469,11 +470,12 @@ module TDev.AST
var resSteps:Step[] = []
orderedSteps.forEach(s => {
seenAct[s._actionName] = true
var m = new SyntacticMethodFinder()
m.dispatch(s.template)
Object.keys(m.calledActions).forEach(name => {
if (!hashActions.hasOwnProperty(name)) {
hashActions[name] = true
if (!seenAct.hasOwnProperty(name)) {
seenAct[name] = true
var act = app.allActions().filter(a => a.getName() == name)[0]
if (act) {
resSteps.pushRange(splitAction(act))