mirror of https://github.com/tc39/test262.git
Add a couple more tests for ASI with fields. (#2128)
This commit is contained in:
parent
8e5ab69e8c
commit
1988988a10
|
@ -0,0 +1,17 @@
|
|||
// Copyright (C) 2019 Jason Orendorff. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: ASI test in field declarations -- error when method on same line
|
||||
esid: sec-automatic-semicolon-insertion
|
||||
features: [class, class-fields-public]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
var C = class {
|
||||
field /* no ASI here */ method(){}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (C) 2019 Jason Orendorff. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: ASI test in field declarations -- error when method on same line after initializer
|
||||
esid: sec-automatic-semicolon-insertion
|
||||
features: [class, class-fields-public]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
var C = class {
|
||||
field = 1 /* no ASI here */ method(){}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (C) 2019 Jason Orendorff. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: ASI test in field declarations -- error when method on same line
|
||||
esid: sec-automatic-semicolon-insertion
|
||||
features: [class, class-fields-public]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
class C {
|
||||
field /* no ASI here */ method(){}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (C) 2019 Jason Orendorff. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: ASI test in field declarations -- error when method on same line after initializer
|
||||
esid: sec-automatic-semicolon-insertion
|
||||
features: [class, class-fields-public]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
class C {
|
||||
field = 1 /* no ASI here */ method(){}
|
||||
}
|
Loading…
Reference in New Issue