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

Readonly pointer casting now works in ZScript #632

Merged
merged 1 commit into from Nov 15, 2018

Conversation

Player701
Copy link
Contributor

See discussion here. This doesn't do anything to the is operator, though. Maybe I could take another shot at it later, if none of the developers are going to bother.

@coelckers coelckers merged commit c569029 into ZDoom:master Nov 15, 2018
@coelckers
Copy link
Member

The 'is' operator should completely ignore readonly state. Doesn't it?

@Player701 Player701 deleted the FixReadonlyCasting branch November 16, 2018 05:48
@Player701
Copy link
Contributor Author

No, it doesn't. I have a relevant example in the forum thread. A simpler version:

class TestClass
{
    void TestFunc()
    {
        let def = GetDefaultByType('Clip');
        if (def is 'Inventory')
        {
            // ...
        }
    }
}
Script error, "zscript.txt:ZSCRIPT" line 6:
Cannot convert Pointer<Class<Clip>readonly > to Pointer<Class<Object>>

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

Successfully merging this pull request may close these issues.

None yet

2 participants