Skip to content

import statements don't work when used from com.sun.whatever package #514

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

Closed
scabug opened this issue Feb 19, 2008 · 5 comments
Closed

import statements don't work when used from com.sun.whatever package #514

scabug opened this issue Feb 19, 2008 · 5 comments
Assignees

Comments

@scabug
Copy link

scabug commented Feb 19, 2008

When I try to compile the following file:

package com.sun.test

import java.util.Date

I get the error message

comsuntest.scala:3: error: Date is not a member of java.util
import java.util.Date
       ^
one error found

It should be possible to be able to write new code in com.sun packages, Sun employees do use Scala too :-)

@scabug
Copy link
Author

scabug commented Feb 19, 2008

Imported From: https://issues.scala-lang.org/browse/SI-514?orig=1
Reporter: Ivan Tarasov (ivant)
Attachments:

@scabug
Copy link
Author

scabug commented Feb 19, 2008

Ivan Tarasov (ivant) said:
file which can't be compiled, although it should

@scabug
Copy link
Author

scabug commented Feb 19, 2008

Ivan Tarasov (ivant) said:
if “sun” in the package name is replaced with something else, e.g. “aaa”, the file compiles correctly. In that specific case (without any classes/objects declared), no files is produced.

@scabug
Copy link
Author

scabug commented Apr 9, 2008

@odersky said:
I assume there's a java subpackage somewhere on the com.sun path which shadows the root java. You need to address the root java package explicitly writing

 _root_.java.util

@scabug
Copy link
Author

scabug commented Jan 14, 2009

@odersky said:
Milestone 2.7.1 deleted

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