Enable function pointers even under no_function.

This commit is contained in:
Stephen Chung
2020-06-30 18:34:58 +08:00
parent 52ef223f83
commit e614790897
10 changed files with 162 additions and 24 deletions

View File

@@ -250,6 +250,7 @@ fn test_module_export() -> Result<(), Box<EvalAltResult>> {
ParseError(x, _) if *x == ParseErrorType::WrongExport
));
#[cfg(not(feature = "no_function"))]
assert!(matches!(
engine.compile(r"fn abc(x) { export x; }").expect_err("should error"),
ParseError(x, _) if *x == ParseErrorType::WrongExport