Last active
March 31, 2017 16:24
-
-
Save polybuildr/dd8dafc61055494efaf32a617adf2221 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[test] | |
fn check_reference_error() { | |
let result = check_and_get_result("var x = 5; y;"); | |
let errors = result.unwrap_err(); | |
assert_eq!(errors.len(), 1); | |
let &(ref error, ref span) = errors.get(0).unwrap(); | |
assert_eq!(*error, TypeCheckerIssue::InterpreterError(InterpreterError::ReferenceError("y".to_owned()))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ideally, what I would like to express this as is: