-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix #14844 #14863
Fix #14844 #14863
Conversation
given that all these fail: when defined case6:
template bar*() =
var r = @[(var i = @[""]; i), (var i = @[""]; i)]
echo r
bar()
when defined case7:
var r = @[(var i = @[""]; i), (var i = @[""]; i)]
echo r
when defined case8:
proc main=
var r = @[(var i = @[""]; i), (var i = @[""]; i)]
echo r
main() it's better to be consistent; as well as to be consistent between MCS and regular call syntax, so the logical thing to do is make both fail; if absolutely needed add a Note that I'm fixing |
10f82ce
to
a5f46f3
Compare
8fec9dc
to
bc23423
Compare
66a0088
to
ca65f1c
Compare
can |
This is very dangerous terrain. |
It was testing that the behaviour is inconsistent with what the code would look like written out manually :D
Too convoluted. Instead sem'checking should understand nkHiddenAddr, nkHiddenDeref and we need a |
That isn't related. This is about preventing typed AST ending up in untyped arguments. |
And why is that a problem? "untyped" must go away, we need a solid typed AST so that macros can do type-based analysis. We don't need "I need untyped because the AST is then simpler", that's a symptom of the underlying issues. |
This pull request has been automatically marked as stale because it has not had recent activity. If you think it is still a valid PR, please rebase it on the latest devel; otherwise it will be closed. Thank you for your contributions. |
One test will fail because the current broken behaviour allowed it to (https://play.nim-lang.org/#ix=2qAU).
Should both fail or work? A manual
(var i = 0); (var i = 0)
currently fails.. (for more context see bb532a6#diff-705c21e2cbb7aca092a9882547994008)