checker: turn warning for var and param module name duplicates into error (#19645)

This commit is contained in:
Turiiya 2023-11-01 07:20:57 +01:00 committed by GitHub
parent a63f3e6f77
commit eab77ccb9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 19 deletions

View file

@ -46,18 +46,18 @@ pub fn new_log_as_logger() &Logger {
fn test_log_mutable() {
println(@FN + ' start')
mut log := Log{}
log.set_level(.info)
log_mutable_statements(mut log)
mut l := Log{}
l.set_level(.info)
log_mutable_statements(mut l)
assert true
println(@FN + ' end')
}
fn test_log_mutable_reference() {
println(@FN + ' start')
mut log := new_log()
assert typeof(log).name == '&log.Log'
t := spawn log_mutable_statements(mut log)
mut l := new_log()
assert typeof(l).name == '&log.Log'
t := spawn log_mutable_statements(mut l)
t.wait()
assert true
println(@FN + ' end')