Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expandAlias("command", nil) should not error #582

Closed
vadi2 opened this issue Mar 31, 2017 · 2 comments
Closed

expandAlias("command", nil) should not error #582

vadi2 opened this issue Mar 31, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@vadi2
Copy link
Member

vadi2 commented Mar 31, 2017

expandAlias("x", nil) currently gives this error: <Send: wrong argument type>

expandAlias("x", nil) should be treated the same as expandAlias("x")

Launchpad Details: #LP1456794 Vadim Peretokin - 2015-05-19 20:37:49 +0000

@vadi2
Copy link
Member Author

vadi2 commented Mar 31, 2017

This Lua sub-system command is mapped to TLuaInterpreter::Send(...) and the second argument, if specified, is a boolean that is recorded as wantPrint (and defaults to TRUE if NOT specified) and then dispatched to the Host class instance with:

pHost->send( QString( luaSendText.c_str() ), wantPrint, false );

Given that boolean FALSE seems to be largely inter-changeable with NIL I don't see how expandAlias("x", nil) can be treated as expandAlias("x") when the latter is already coded as expandAlias("x", true) and NOT expandAlias("x", false)...

I suspect this will become a WON'T FIX or it will break existing code won't it?

Fair enough, the error messages are not up to scratch for this function, but sadly that is not uncommon!

Launchpad Details: #LPC Stephen Lyons - 2015-05-20 22:18:06 +0000

@vadi2 vadi2 added the low label Mar 31, 2017
@vadi2
Copy link
Member Author

vadi2 commented Mar 31, 2017

expandAlias("x", nil) and expandAlias("x") are exactly the same as far as Lua code is concerned.

Launchpad Details: #LPC Vadim Peretokin - 2017-03-31 19:16:53 +0000

@vadi2 vadi2 self-assigned this Sep 27, 2017
@vadi2 vadi2 added this to the 3.5.0 milestone Sep 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant