Skip to content

macros: raw identifier bug #536

@kakserpom

Description

@kakserpom

Branch: master

use ext_php_rs::prelude::*;

#[php_class]
pub struct Example {}
#[php_impl]
impl Example {
    pub fn foo(&self, r#as: &str) {}
}
#[php_module]
pub fn get_module(module: ModuleBuilder) -> ModuleBuilder {
    module.class::<Example>()
}
<?php

// Stubs for untitled5

namespace {
    class Example {
        public function foo(string $r#as) {}

        public function __construct() {}
    }
}

Also, __construct() in stubs is unnecessary since you can't instantiate this class from PHP.

P.S. Pardon me for not using the issue templates :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmacrosRelated to macrosstubsRelated to stub generation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions