The expansion of `$@` in `local args="$@"` is _unspecified_ by the POSIX standard. The `bash` shell will create a single space-delimited string containing all the positional parameters as the value for the `args` variable, while `dash` will try to execute `local args="$1" "$2" "$3"` (etc.)
In your case, you should use
```
my_func () {
local args
args="$*"
printf 'args: <%s>\n' "$args"
}
```
or
```
my_func () {
local args="$*"
printf 'args: <%s>\n' "$args"
}
```
I'm using `$*` here to make it obvious that I'm constructing a single string from a list of values. The string will contain the values of the positional parameters, delimited by the first character of `$IFS` (a space by default).
I'm also using `printf` to be sure to get the correct output of the user-supplied values (see https://unix.stackexchange.com/questions/65803).
Also, your script should use `#!/bin/dash` as the first line rather than `#!/bin/sh` as `local` is an extension to the standard `sh` syntax.