Skip to content

GettingStarted sample code does not compile #16

Open
@ochafik

Description

@ochafik

From @mslinn on January 10, 2012 21:27

Here is my build.sbt:

name := "ScalaClTest"

version := "0.1"

scalaVersion := "2.9.1"

autoCompilerPlugins := true

scalacOptions ++= Seq("-deprecation")

addCompilerPlugin("com.nativelibs4java" % "scalacl-compiler-plugin" % "0.2")

resolvers ++= Seq(
  "Sonatype OSS Snapshots" at "http://oss.sonatype.org/content/groups/public/",
  "NativeLibs4Java"        at "http://nativelibs4java.sourceforge.net/maven/",
  "Typesafe Snapshots"     at "http://repo.typesafe.com/typesafe/snapshots",
  "Typesafe Releases"      at "http://repo.typesafe.com/typesafe/releases",
  "Scala-Tools Snapshots"  at "http://scala-tools.org/repo-snapshots",
  "Scala Tools Releases"   at "http://scala-tools.org/repo-releases",
  "Sonatype"               at "http://nexus.scala-tools.org/content/repositories/public"
)

libraryDependencies ++= Seq(
  "com.nativelibs4java" %  "scalacl"   % "latest.integration" % "compile" withSources(),
  "org.scalatest"       %% "scalatest" % "latest.integration" % "test"    withSources()
)

I get two errors when compiling the GettingStarted sample code:

[error] E:\work\experiments\scala\scalaclTest\src\main\scala\Test.scala:6: value best is not a member of object scalacl.Context
[error]  Note: implicit value context is not applicable here because it comes after the application point and it lacks an explicit result type
[error]     implicit val context = Context.best // prefer CPUs ? use Context.best(CPU)
[error]                                    ^
[error] E:\work\experiments\scala\scalaclTest\src\main\scala\Test.scala:7: value cl is not a member of scala.collection.immutable.Range
[error]     val rng = (100 until 100000).cl // transform the Range into a CLIntRange

Copied from original issue: nativelibs4java/nativelibs4java#229

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions