mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
v: forbid function parameter names, shadowing imported module names (#17210)
This commit is contained in:
parent
c16549b6fd
commit
404a9aa442
45 changed files with 381 additions and 230 deletions
|
@ -1,5 +1,5 @@
|
|||
import db.sqlite
|
||||
import db.mysql
|
||||
import db.mysql as sql
|
||||
import db.pg
|
||||
|
||||
[table: 'modules']
|
||||
|
@ -74,7 +74,7 @@ fn sqlite3_array() {
|
|||
}
|
||||
|
||||
fn mysql_array() {
|
||||
mut db := mysql.Connection{
|
||||
mut db := sql.Connection{
|
||||
host: 'localhost'
|
||||
port: 3306
|
||||
username: 'root'
|
||||
|
@ -186,7 +186,7 @@ fn sqlite3() {
|
|||
}
|
||||
|
||||
fn mysql() {
|
||||
mut conn := mysql.Connection{
|
||||
mut conn := sql.Connection{
|
||||
host: 'localhost'
|
||||
port: 3306
|
||||
username: 'root'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue