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

Implicit context value is shadowed by context method in TraitView #8

Closed
PkmX opened this Issue Jan 23, 2013 · 5 comments

Comments

Projects
None yet
2 participants
@PkmX
Contributor

PkmX commented Jan 23, 2013

The implicit value context from SActivity or SContext is shadowed by the context method defined in TraitView, which causes an error when compiling with Scala 2.10 due to SI-4270.

new SVerticalLayout {
    += (new STextView)
}

Calling scalac with -Xlog-implicits gives:

[info] MainActivity.scala:12: context is not a valid implicit value for android.content.Context because:
[info] candidate implicit value context in trait SActivity is shadowed by method context in trait TraitView
[info]         += (new STextView)
[info]             ^
[error] MainActivity.scala:12: could not find implicit value for parameter context: android.content.Context

Removing context method from TraitView definitely gets rid of this error. I guess that one of them needs to be re-named, not sure what you think about this.

pocorall added a commit that referenced this issue Jan 23, 2013

@pocorall

This comment has been minimized.

Show comment
Hide comment
@pocorall

pocorall Jan 23, 2013

Owner

Thank you for your active participation. Wow, you live in Taipei. I visited Taipei last week on my vacation. It was a nice city with warm winter and delicious foods (chou dou fu).

Owner

pocorall commented Jan 23, 2013

Thank you for your active participation. Wow, you live in Taipei. I visited Taipei last week on my vacation. It was a nice city with warm winter and delicious foods (chou dou fu).

@pocorall pocorall closed this Jan 23, 2013

@PkmX

This comment has been minimized.

Show comment
Hide comment
@PkmX

PkmX Jan 23, 2013

Contributor

That happens to be my favorite food as well. :)

(By the way also update README to be reflect this fix.)

Contributor

PkmX commented Jan 23, 2013

That happens to be my favorite food as well. :)

(By the way also update README to be reflect this fix.)

@pocorall

This comment has been minimized.

Show comment
Hide comment
@pocorall

pocorall Jan 23, 2013

Owner

OK, just fixed it. And a maven artifact of the next release will be compiled with Scala 2.10.

Owner

pocorall commented Jan 23, 2013

OK, just fixed it. And a maven artifact of the next release will be compiled with Scala 2.10.

@PkmX

This comment has been minimized.

Show comment
Hide comment
@PkmX

PkmX Jan 23, 2013

Contributor

Nice!

Would you release the pom or sbt config used to create the artifact?

Contributor

PkmX commented Jan 23, 2013

Nice!

Would you release the pom or sbt config used to create the artifact?

@pocorall

This comment has been minimized.

Show comment
Hide comment
@pocorall

pocorall Jan 23, 2013

Owner

Good idea. I just uploaded the pom.xml and then you can just issue mvn package to build it.

Owner

pocorall commented Jan 23, 2013

Good idea. I just uploaded the pom.xml and then you can just issue mvn package to build it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment