Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • S sweet-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 62
    • Issues 62
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • sweet-js
  • sweet-core
  • Issues
  • #68
Closed
Open
Issue created Apr 30, 2013 by Tim Disney@disnetContributor

quoting a bound pattern variable fails

Trying to quote an already bound pattern variable:

macro m {
    case $x => {
        macro n {
            case $[$x] => $x
        }
    }
}
m bar
n bar

gives the following error:

/Users/tim/Dropbox/dev/sweet-js/lib/expander.js:903
            if (head.hasPrototype(TermTree)) {
                     ^
TypeError: Cannot call method 'hasPrototype' of undefined
    at step (/Users/tim/Dropbox/dev/sweet-js/lib/expander.js:903:22)
    at step (/Users/tim/Dropbox/dev/sweet-js/lib/expander.js:1021:28)
    at enforest (/Users/tim/Dropbox/dev/sweet-js/lib/expander.js:1102:16)
    at expandToTermTree (/Users/tim/Dropbox/dev/sweet-js/lib/expander.js:1646:17)
    at expandToTermTree (/Users/tim/Dropbox/dev/sweet-js/lib/expander.js:1656:20)
    at expandToTermTree (/Users/tim/Dropbox/dev/sweet-js/lib/expander.js:1656:20)
    at expand (/Users/tim/Dropbox/dev/sweet-js/lib/expander.js:1795:21)
    at expandTermTreeToFinal (/Users/tim/Dropbox/dev/sweet-js/lib/expander.js:1677:43)
    at syntaxFromToken.value (/Users/tim/Dropbox/dev/sweet-js/lib/expander.js:1797:20)
    at Array.map (native)
Assignee
Assign to
Time tracking