aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/syntax/testdata/issue23385.src
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/syntax/testdata/issue23385.src')
-rw-r--r--src/cmd/compile/internal/syntax/testdata/issue23385.src12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/syntax/testdata/issue23385.src b/src/cmd/compile/internal/syntax/testdata/issue23385.src
new file mode 100644
index 0000000000..44abcd7e23
--- /dev/null
+++ b/src/cmd/compile/internal/syntax/testdata/issue23385.src
@@ -0,0 +1,12 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Check error message for use of = instead of == .
+
+package p
+
+func f() {
+ if true || 0 = 1 /* ERROR assignment .* used as value */ {
+ }
+}