summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/comments/hashbang/function-body.js
blob: 1e2f5f9f638d25b4c4f3b903f4b47f2ffbd34cf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// |reftest| error:SyntaxError
// Copyright (C) 2019 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: pending
description: >
    Hashbang comments should only be allowed at the start of source texts and should not be allowed within function bodies.
info: |
    HashbangComment::
      #! SingleLineCommentChars[opt]
negative:
  phase: parse
  type: SyntaxError
features: [hashbang]
---*/

$DONOTEVALUATE();

function fn() {#!
}