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

Referencing before declaration: def f1 = v1 ; val v1 = 0 #229

Open
valtih1978 opened this issue Nov 4, 2015 · 4 comments
Open

Referencing before declaration: def f1 = v1 ; val v1 = 0 #229

valtih1978 opened this issue Nov 4, 2015 · 4 comments

Comments

@valtih1978
Copy link

Scala Worksheet 0.4.0.v-2_11-201509281548-ab29b9c refuses to run

object o2 {

    def abc = zero ; val zero = 1

}

despite I see that it is compilable in http://scastie.org/12942

Originally, I have discovered it a bit longer form, http://scastie.org/12932

object o2 {
    case class E() {

        def abc = zero match {
                case _ => 2
            }

    }
    val zero = E()
    zero.abc
}
@valtih1978
Copy link
Author

I flipped declaration order

   val zero = 1
   def abc = zero

to work around

@valtih1978 valtih1978 changed the title def abc = zero ; val zero = 0 Referencing before declaration: def f1 = v1 ; val v1 = 0 Nov 11, 2015
@valtih1978
Copy link
Author

Probably, you can integrate a standard compiler instead of relying on your own for better quality and specification conformity. Is it possible?

Which guidelines did you use to learn Eclipse worksheets/plugins? Do you have a guideline for getting involved developers? I am more interested to know how to program worksheets in principle.

@kiritsuku
Copy link
Member

We use the standard compiler scalac. The problems arise because the document needs to be crippled apart. If you are interested to contribute to the worksheet or if you want to get details about its internals, you should speak up at scala-ide-dev or on gitter.

@valtih1978
Copy link
Author

Gitter page in Wikipedia says that you should have a gitter badge at your README file.

[![Join the chat at https://gitter.im/scala-ide/scala-ide](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/scala-ide/scala-ide)

Join the chat at https://gitter.im/scala-ide/scala-ide

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