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

DevX: Incorrect error message when with extra curly bracket #1328

Open
ccinelli opened this issue May 15, 2019 · 0 comments
Open

DevX: Incorrect error message when with extra curly bracket #1328

ccinelli opened this issue May 15, 2019 · 0 comments

Comments

@ccinelli
Copy link
Contributor

ccinelli commented May 15, 2019

Marko Version: 4.16.0

Error:

The "class" tag does not allow nested body content at line 28 col 2

Code:

style.less {
	.aclass {
    	color: #000;
    }
    .aclass1 {
    	color: #000;
    }
    .aclass2 {
    	color: #000;
    }
    .aclass3 {
    	color: #000;
    }
}


class {
  onCreate() {
  	this.state = {
    	v : null
    }}; // Error is HERE! double curly bracket!
    
    //More stuff
    this.anothervar = {
    	what: 3
    };
  }
  onLanguageSelect() {
    const el = this.getEl("languageSelect");
    const selected = el.options[el.selectedIndex].value;
    this.emit("select-language", selected);
  }
}

<div>
</div>

Expected Behavior

The error should point at }}

Actual Behavior

The "class" tag does not allow nested body content at line 28 col 2

Steps to Reproduce

Copy the code in https://markojs.com/try-online

@ccinelli ccinelli changed the title DevX: Incorrect error message when with extra curly braket DevX: Incorrect error message when with extra curly bracket May 15, 2019
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

1 participant