Make all errors extend Object

Part of #670
This commit is contained in:
Matt Kraai
2018-08-17 13:10:11 -07:00
parent 687412ec50
commit bec3178e3c
6 changed files with 15 additions and 5 deletions

View File

@ -9,6 +9,8 @@ fn syntax_error() {
assert!(error.is_instance_of::<SyntaxError>());
assert!(error.is_instance_of::<Error>());
assert!(error.is_instance_of::<Object>());
let _: &Error = error.as_ref();
let _: &Object = error.as_ref();
let base: &Error = error.as_ref();
assert_eq!(JsValue::from(base.message()), "msg");