jdk/test/tools/jjs/strict.js
author dnsimon
Tue, 23 Aug 2016 15:16:45 +0000 (2016-08-23)
changeset 40872 6364f752fdc5
parent 34721 59801fbd042e
permissions -rw-r--r--
8164214: [JVMCI] include VarHandle in signature polymorphic method test Reviewed-by: kvn, twisti, iveresov, psandoz
/*
 * This is the test JavaScript program used in jjs-strictTest.sh
 */

try {
    v = "hello";
    throw new Error("should have thrown ReferenceError");
} catch (e) {
    if (! (e instanceof ReferenceError)) {
        throw new Error("ReferenceError expected, got " + e);
    }
}