Recognize some unsupported functions

Some functions are called without the use of $(call),
since $(call) is not necessary when the function doesn't
take any arguments. mk2rbc thinks these function calls
are local variables, and converts them as such. This
leads to undefined variable errors when trying to load
(before even executing) the starlark file.

Hardcode a known function that should not be converted
to a local variable.

Bug: 226974242
Test: go test
Change-Id: I5567a34fcc282b181a7e78ac3d5cc9b40bd025a2
This commit is contained in:
Cole Faust
2022-04-26 14:28:04 -07:00
parent 12097e3109
commit 1e27586012
3 changed files with 32 additions and 22 deletions

View File

@@ -741,8 +741,8 @@ func (_ *badExpr) typ() starlarkType {
return starlarkTypeUnknown
}
func (_ *badExpr) emitListVarCopy(_ *generationContext) {
panic("implement me")
func (b *badExpr) emitListVarCopy(gctx *generationContext) {
b.emit(gctx)
}
func (b *badExpr) transform(transformer func(expr starlarkExpr) starlarkExpr) starlarkExpr {