FE 1.0: introduce PrivateInFile effective visibility #KT-20094 Fixed

This commit is contained in:
Mikhail Glukhikh
2021-04-05 13:33:25 +03:00
parent addfa27980
commit 4bd44fa61b
16 changed files with 187 additions and 30 deletions
@@ -53,22 +53,22 @@ Exit code: ABORT
------------------------------------------
COMPILATION FAILED
Cannot access 'A': it is private in file
'public' subclass exposes its 'private' supertype A
'public' generic exposes its 'private' parameter bound type A
'public' subclass exposes its 'private-in-file' supertype A
'public' generic exposes its 'private-in-file' parameter bound type A
Cannot access 'A': it is private in file
Cannot access 'A': it is private in file
'public' function exposes its 'private' parameter type A
'public' function exposes its 'private-in-file' parameter type A
Cannot access 'A': it is private in file
Cannot access 'A': it is private in file
'public' function exposes its 'private' return type A
'public' function exposes its 'private-in-file' return type A
Cannot access 'A': it is private in file
Cannot access 'A': it is private in file
Cannot access 'A': it is private in file
Cannot access 'A': it is private in file
'public' function exposes its 'private' return type A
'public' function exposes its 'private-in-file' return type A
Cannot access 'A': it is private in file
Cannot access 'A': it is private in file
'public' function exposes its 'private' return type A
'public' function exposes its 'private-in-file' return type A
================ Step #2 =================
@@ -35,8 +35,8 @@ Exit code: ABORT
------------------------------------------
COMPILATION FAILED
Cannot access 'A': it is private in file
'public' subclass exposes its 'private' supertype A
'public' function exposes its 'private' return type A
'public' subclass exposes its 'private-in-file' supertype A
'public' function exposes its 'private-in-file' return type A
Cannot access 'A': it is private in file
Cannot access 'A': it is private in file
Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Any?