fixed a bug of not checking a function name against named variables
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
function f(f)
|
||||
function f(x)
|
||||
{
|
||||
print f;
|
||||
print x;
|
||||
f("my hello");
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
# should print 50
|
||||
function fn(f) { f = 20; }
|
||||
BEGIN { f = 50; fn(100); print f; }
|
||||
# should print 50
|
||||
function fn(f) { f = 20; }
|
||||
BEGIN { f = 50; fn(100); print f; }
|
||||
|
@ -1,3 +1,3 @@
|
||||
# A function and a named variable cannot have the same name.
|
||||
function a () { }
|
||||
BEGIN { a = 20; }
|
||||
function a () { }
|
||||
BEGIN { a = 20; }
|
||||
|
Reference in New Issue
Block a user