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

Error: Generated byte code contains an operand stack underflow. #111

Open
Harbs opened this issue Jan 14, 2020 · 1 comment
Open

Error: Generated byte code contains an operand stack underflow. #111

Harbs opened this issue Jan 14, 2020 · 1 comment
Labels

Comments

@Harbs
Copy link
Contributor

Harbs commented Jan 14, 2020

I discovered a situation which results in the error above. It had me scratching my head for quite some time until I found the problem:

I had some markup which can be distilled to the following:

    <sp:Card>
      <sp:CardFooter text="Footer"/>
      <sp:quickActions>
        <sp:QuickActions/>
      </sp:quickActions>
    </sp:Card>

A Spectrum Card has a member called quickActions which is assigned a QuickActions component. It can also be assigned a Footer element. Specifying the element (sp:CardFooter) before the quickActions setter, caused the stack underflow.

The following modification fixes the error:

     <sp:Card>
      <sp:quickActions>
        <sp:QuickActions/>
      </sp:quickActions>
      <sp:CardFooter text="Footer"/>
    </sp:Card>

I don't know if the order of the declarations is a hard requirement, but if it is, we need a better error message...

@carlosrovira
Copy link
Contributor

Hi, I think compiler should differentiate property members from elements, and the user should be able to declare in the any order, even mixing them. Then just elements should be taken by the order of declaration.
just my 2...

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

3 participants