Visibility of classes and their members between modules #925

Closed
renatoathaydes opened this Issue Feb 2, 2014 · 1 comment

Projects

None yet

2 participants

@renatoathaydes

Description:

Let Unshared be a shared class in a un-shared package.
Let Shared be a shared class in a shared package with the following definition:

shared class Shared() {
   shared void hi(Unshared u) {}
}

Current result:

Now, code in external modules can see Shared and its shared method hi... therefore, they can also see Unshared, although they cannot instantiate it directly and arguably should not be able to even "see" it exists.

Expected result:

The class Shared should not get compiled and an error should indicate that it is trying to expose classes from unshared packages to external modules.

From the following discussion:

https://groups.google.com/forum/#!topic/ceylon-users/z-BAF6YBT90

@gavinking gavinking was assigned Feb 2, 2014
@gavinking gavinking closed this in 609d479 Feb 18, 2014
@gavinking
Ceylon member

Fixed, thanks @renatoathaydes.

@gavinking gavinking added a commit that referenced this issue Feb 18, 2014
@gavinking gavinking oops, fix the fix for #925 d15f4ab
@gavinking gavinking added a commit that referenced this issue Feb 19, 2014
@gavinking gavinking test for #925 5b8e88c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment