-
Notifications
You must be signed in to change notification settings - Fork 0
Interop with xp-forge/partial broken #15
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
Labels
Comments
Fix: --- src/main/php/lang/ast/Parse.class.php 2017-10-31 17:30:56.570161100 +0100
+++ src/main/php/lang/ast/Parse.class.php.new 2017-10-31 17:30:46.244551200 +0100
@@ -402,19 +402,23 @@
$this->token= $this->advance();
if ('{' === $this->token->symbol->id) {
+ $types= [];
while ('}' !== $this->token->symbol->id) {
$this->token= $this->advance();
$class= $this->token->value;
+ $types[]= $import.$class;
$this->scope->import($import.$class);
$this->token= $this->advance();
}
$this->token= $this->advance();
} else {
+ $types= [$import];
$this->scope->import($import);
}
$this->token= $this->expect(';');
$node->arity= 'import';
+ $node->value= $types;
return $node;
});
--- src/main/php/lang/ast/Emitter.class.php 2017-10-31 17:31:04.758931100 +0100
+++ src/main/php/lang/ast/Emitter.class.php.new 2017-10-31 17:31:01.913885000 +0100
@@ -189,11 +189,11 @@
}
protected function emitPackage($node) {
- $this->out->write('namespace '.$node->value.";\n");
+ $this->out->write('namespace '.$node->value.';');
}
protected function emitImport($node) {
- // NOOP
+ $this->out->write('use '.implode(',', $node->value).';');
}
protected function emitAnnotation($node) { |
Maybe this should be part of the compiler itself? use lang\partial\Value;
class User is Value {
// ..
} This would call e.g. More complex matter => RFC needed |
thekid
added a commit
that referenced
this issue
Oct 31, 2017
thekid
added a commit
that referenced
this issue
Oct 31, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dynamic traits cannot be resolved, resulting in
Cannot instantiate incomplete type com\example\user\lang\partial\Value
The text was updated successfully, but these errors were encountered: