Skip to content

Commit eed07ce

Browse files
committed
Merge remote-tracking branch 'github/pull/1232' into msimacek/GR-80787-GitHub_PRs_1227-1232
2 parents 8080a1b + 0a2fe02 commit eed07ce

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎graalpython/com.oracle.graal.python.test/src/tests/test_parser.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,15 @@ def test_incomplete_input_error():
7373
assert False, "SyntaxError was not raised"
7474

7575

76+
def test_compile_unrecognised_flags_message():
77+
try:
78+
compile("1", "<input>", "exec", 0x7fffffff)
79+
except ValueError as e:
80+
assert str(e) == "compile(): unrecognised flags"
81+
else:
82+
assert False, "ValueError was not raised"
83+
84+
7685
def test_lambdas_as_function_default_argument_values():
7786
globs = {}
7887
exec("""

‎graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/BuiltinFunctions.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ private void checkOptimize(int optimize, Object kwOptimize) throws PException {
11391139
@TruffleBoundary
11401140
private void checkFlags(int flags) {
11411141
if ((flags & ~(PyCF_MASK | PyCF_MASK_OBSOLETE | PyCF_COMPILE_MASK)) != 0) {
1142-
throw PRaiseNode.raiseStatic(this, ValueError, null, NO_VALUE, ErrorMessages.UNRECOGNIZED_FLAGS, PythonUtils.EMPTY_OBJECT_ARRAY);
1142+
throw PRaiseNode.raiseStatic(this, ValueError, ErrorMessages.UNRECOGNIZED_FLAGS);
11431143
}
11441144
}
11451145

0 commit comments

Comments
 (0)