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

GDScript: Add is not operator #87939

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

dalexeev
Copy link
Member

@dalexeev dalexeev commented Feb 4, 2024

func test():
    var s: Variant = "str"
    print(await s is not int)
    print(not(await s is int))
    print(await (s is not int))
Class <unnamed> :
|   Function test(  ) :
|   |   Variable s : Variant
|   |   |   = "str"

|   |   print( (NOTAwait s IS int) )
|   |   print( (NOTAwait s IS int) )
|   |   print( Await (NOTs IS int) )

PREC_TYPE_TEST,
PREC_AWAIT,
PREC_CALL,
PREC_ATTRIBUTE,
PREC_SUBSCRIPT,
PREC_PRIMARY,

@dalexeev dalexeev added this to the 4.x milestone Feb 4, 2024
@dalexeev dalexeev requested a review from a team as a code owner February 4, 2024 12:47
Copy link
Contributor

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder that @vnen did not even realize this was never a thing.

@dalexeev dalexeev force-pushed the gds-add-is-not-operator branch from 4fda18a to 033adb4 Compare February 4, 2024 13:51
@dalexeev dalexeev force-pushed the gds-add-is-not-operator branch from 033adb4 to 2bf2595 Compare February 4, 2024 14:37
Copy link
Member

@adamscott adamscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice and clean. Thanks @dalexeev !

@adamscott adamscott modified the milestones: 4.x, 4.3 Feb 4, 2024
@akien-mga akien-mga requested a review from vnen February 5, 2024 13:13
@akien-mga akien-mga merged commit 888299d into godotengine:master Feb 7, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

Allow usage of is not in GDScript
5 participants