Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/js/src/tests/non262/PrivateName/   (Firefox Browser Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 969 B image not shown  

Quelle  error-locations.js

  Sprache: JAVA
 

// |reftest|
function assertLineAndColumn(str, line, column) {
  try {
    eval(str);
    throw 'didn\'t syntaxerror, bad.'
  } catch (e) {
    assertEq(e instanceof SyntaxError, true);
    assertEq(e.lineNumber, line);
    assertEq(e.columnNumber, column);
  }
}

assertLineAndColumn(`class A { g() { return this.#x; }}`, 129);
// Make sure we're reporting the first error, if there are multiple, in class
// exit context;
assertLineAndColumn(
    `class A { g() { return this.#x; } y() { return       this.#z + this.#y; } }`,
    129);
assertLineAndColumn(`this.#x`, 16);
// Make sure we're reporting the first error, if there are multiple, in
// non-class context;
assertLineAndColumn(`this.#x; this.#y; this.#z`, 16);

assertLineAndColumn(
    `class A {
g() { return this.#x; }}`,
    219);
assertLineAndColumn(
    `class A {

g() { return this.#x; } y() { return this.#y; }}`,
    319);

if (typeof reportCompare === 'function') reportCompare(00);

Messung V0.5 in Prozent
C=86 H=72 G=78

¤ Dauer der Verarbeitung: 0.15 Sekunden  (vorverarbeitet am  2026-06-07) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.