Work-around for gcc

This commit is contained in:
Vyacheslav Egorov 2022-12-02 18:22:01 +02:00
parent f10b294d62
commit 6cd507dff0
2 changed files with 3 additions and 2 deletions

View file

@ -27,7 +27,6 @@ jobs:
- uses: actions/checkout@v1
- name: make tests
run: |
g++ --version
make -j2 config=sanitize werror=1 native=1 luau-tests
- name: run tests
run: |

View file

@ -1807,7 +1807,9 @@ ConstraintGraphBuilder::FunctionSignature ConstraintGraphBuilder::checkFunctionS
signatureScope->privateTypePackBindings[name] = g.tp;
}
expectedType.reset();
// Local variable works around an odd gcc 11.3 warning: <anonymous> may be used uninitialized
std::optional<TypeId> none = std::nullopt;
expectedType = none;
}
std::vector<TypeId> argTypes;