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

Variadics bug #61

Closed
elquimista opened this issue Feb 3, 2016 · 3 comments
Closed

Variadics bug #61

elquimista opened this issue Feb 3, 2016 · 3 comments

Comments

@elquimista
Copy link

Reporting variadics bug here:

mixin post-list(...posts)
    each $post in $posts
        header= $post->title
        article= $post->content

+post-list($post1, $post2, $post3, $post4)

The above jade code throws php error when compiled.
In fact, I see the unwanted semicolon in the following:

<?php $__args = isset($__args) ? $__args : [];?>
<?php $__mixins = [];?>
<?php $__mixins['post-list'] = function(array $__arguments) use($__args, $__mixins) {
  static $__defaults = ['posts' => array_slice($__arguments, 0);];
  $__arguments = array_replace($__defaults, $__arguments);
  $__args = array_replace($__args, $__arguments);
  extract($__args);

?>
...
@TorbenKoehn
Copy link
Member

Okay, I just wanted to release 1.4.0, I'll wait until I fixed that one :)

TorbenKoehn pushed a commit that referenced this issue Feb 3, 2016
- Optimized iterator ID
- Added variadic tests
TorbenKoehn added a commit that referenced this issue Feb 3, 2016
Fixed a trailing semicolon in variadics (#61)
@TorbenKoehn
Copy link
Member

Please update to 1.4.0 and tell me if it's fixed please :)

https://github.com/Talesoft/tale-jade/releases/tag/1.4.0

@elquimista
Copy link
Author

Thanks. Variadics now works okay

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

No branches or pull requests

2 participants