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

BUG: update property #1915

Closed
chrysanthemum opened this issue Sep 20, 2019 · 0 comments
Closed

BUG: update property #1915

chrysanthemum opened this issue Sep 20, 2019 · 0 comments
Labels

Comments

@chrysanthemum
Copy link
Contributor

zephir/test/properties/propertyupdate.zep

namespace Test\Properties;

class PropertyUpdate
{
    public p1;

    public function update1() {
        let this->p1[] = "aaa";
    }

}

unit-tests/Extension/Properties/PropertyUpdateTest.php

<?php
namespace Extension\Properties;

use PHPUnit\Framework\TestCase;
use Test\Properties\PropertyUpdate;

class PropertyUpdateTest extends TestCase
{
    public function testUpdate11() {
        // before fixed. Assertion failed: (((ht)->gc.refcount == 1) || ((ht)->u.flags & (1<<6))), function _zend_hash_index_add_or_update_i
        $t = new PropertyUpdate();
        $t->p1 = [111];
        $t->update1();

        $this->assertSame($t->p1, [111, 'aaa']);
    }
}

Assertion failed: (((ht)->gc.refcount == 1) || ((ht)->u.flags & (1<<6))), function _zend_hash_index_add_or_update_i

This was referenced Sep 20, 2019
sergeyklay added a commit that referenced this issue Sep 22, 2019
@sergeyklay sergeyklay added the bug label Sep 23, 2019
sergeyklay added a commit that referenced this issue Oct 2, 2019
dreamsxin pushed a commit to dreamsxin/zephir that referenced this issue Nov 6, 2019
dreamsxin pushed a commit to dreamsxin/zephir that referenced this issue Nov 6, 2019
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

2 participants