summaryrefslogtreecommitdiffstats
path: root/tests/diagnostics
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2025-07-22 08:47:50 -0700
committerGitHub <noreply@github.com>2025-07-22 15:47:50 +0000
commit52a45890b5ab71d7dbfdd01955afce129728d67e (patch)
tree141491e9c36cfa6a1a890765682d69ac4bfd2270 /tests/diagnostics
parent0d26dbaad90f5eac604e148971d14e552bf9d5b8 (diff)
Fix crash when private ctor is used for coercion. (#7858)
* Fix crash when private ctor is used for coercion. * Fix tests. * Fix. * Fix test error.
Diffstat (limited to 'tests/diagnostics')
-rw-r--r--tests/diagnostics/private-visibility.slang11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/diagnostics/private-visibility.slang b/tests/diagnostics/private-visibility.slang
index 7c0bad970..b7cb628f4 100644
--- a/tests/diagnostics/private-visibility.slang
+++ b/tests/diagnostics/private-visibility.slang
@@ -24,21 +24,20 @@ struct MyType
get { return member; }
set { member = newValue; }
}
- // CHECK:{{.*}}(28): error 30601:
+ // CHECK:{{.*}}([[# @LINE+1]]): error 30601:
public void publicMethod() {} // ERROR.
}
void test()
{
- // CHECK:{{.*}}(34): error 30600:
- MyType t; // ERROR.
+ MyType t; // should leave uninitialized.
// CHECK-NOT:{{.*}}error
t.func1(); // OK.
- // CHECK:{{.*}}(38): error 30600:
+ // CHECK:{{.*}}([[# @LINE+1]]): error 30600:
t.func(); // ERROR.
- // CHECK:{{.*}}(40): error 30600:
+ // CHECK:{{.*}}([[# @LINE+1]]): error 30600:
t[0] = 1; // ERROR.
- // CHECK:{{.*}}(43): error 30600:
+ // CHECK:{{.*}}([[# @LINE+1]]): error 30600:
t.member = 2;
}