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

"is not null" doesn't seem to be doing the same type inference "!= null" does. #350

Open
DDR0 opened this issue Feb 5, 2023 · 1 comment

Comments

@DDR0
Copy link
Contributor

DDR0 commented Feb 5, 2023

https://discord.com/channels/225816341737766912/957180642037202986/1071643217637949441

So if you have a
if (me_base_card is not null and new_base_card is not null,
set(new_base_card.portrait, me_base_card.portrait)
) where me_base_card = me.base_card
where new_base_card = new_creature.base_card

And base_card is a map|null type, shouldn't the if statement signal to the engine that it's me_base_card and new_base_card can only be map and not null within the if statement?

LaserCat — Yesterday at 20:01
if (me_base_card is not null and new_base_card is not null,
set(new_base_card.portrait, me_base_card.portrait)
) where me_base_card = me.base_card
where new_base_card = new_creature.base_card
[20:01]
for easier reading ^

Touhou Project 東方プロジェクト — Yesterday at 20:07
OK so "is not null" doesn't work but "!= null" does

@DDR0
Copy link
Contributor Author

DDR0 commented Jun 4, 2023

Probable duplicate of #273 and #6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant