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

Uncaught SyntaxError: Unexpected token . #1485

Closed
n1k0 opened this issue Sep 12, 2016 · 3 comments
Closed

Uncaught SyntaxError: Unexpected token . #1485

n1k0 opened this issue Sep 12, 2016 · 3 comments

Comments

@n1k0
Copy link

n1k0 commented Sep 12, 2016

While messing around trying to figure out how to reuse message types across modules, I've introduced an erroneous use of a dot notation which compiled fine but generated a SyntaxError once executed in the browser.

Sample minimal code:

module Bug exposing (..)


type Msg
    = NoOp
    | Foo.Bar


type alias Model =
    {}


update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
    case msg of
        NoOp ->
            ( model, Cmd.none )

        Foo.Bar ->
            ( model, Cmd.none )

Compiles just fine while it probably shouldn't. Generated js breaks with a SyntaxError:

I'm using Elm v0.17 installed from npm on Ubuntu 16.04 64.

@process-bot
Copy link

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

@jvoigtlaender
Copy link
Contributor

This is a known problem. As the issue template says, please check the "meta" issues before opening new ones. In this case, #1374.

@n1k0
Copy link
Author

n1k0 commented Sep 12, 2016

Sorry, I swear I searched.

@n1k0 n1k0 closed this as completed Sep 12, 2016
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

3 participants