Additional heuristics: variables with names ending with _LIST are lists
Bug: 193540681 Test: internal Change-Id: Ic23bf0f0eadb159285650f0b7e20307788c12387
This commit is contained in:
@@ -414,7 +414,7 @@ endif
|
|||||||
|
|
||||||
def init(g, handle):
|
def init(g, handle):
|
||||||
cfg = rblf.cfg(handle)
|
cfg = rblf.cfg(handle)
|
||||||
if rblf.filter(g.get("PRODUCT_LIST", ""), g["TARGET_PRODUCT"]):
|
if rblf.filter(g.get("PRODUCT_LIST", []), g["TARGET_PRODUCT"]):
|
||||||
pass
|
pass
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
|
@@ -299,6 +299,10 @@ func (ctx *parseContext) addVariable(name string) variable {
|
|||||||
vt = vi.valueType
|
vt = vi.valueType
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if strings.HasSuffix(name, "_LIST") && vt == starlarkTypeUnknown {
|
||||||
|
// Heuristics: Variables with "_LIST" suffix are lists
|
||||||
|
vt = starlarkTypeList
|
||||||
|
}
|
||||||
v = &otherGlobalVariable{baseVariable{nam: name, typ: vt}}
|
v = &otherGlobalVariable{baseVariable{nam: name, typ: vt}}
|
||||||
}
|
}
|
||||||
ctx.variables[name] = v
|
ctx.variables[name] = v
|
||||||
|
Reference in New Issue
Block a user