/* ----------------------------------------------------------------------------- Copyright 2020 Kevin P. Barry Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ----------------------------------------------------------------------------- */ // Author: Kevin P. Barry [ta0kira@gmail.com] testcase "public types in private deps stay hidden" { success } unittest test { \ Test.run() } // Internal is defined in visibility/internal and visibility2/internal. The // three definitions should not interfere with each other, despite two of them // being public. concrete Internal { @type create () -> (Internal) @value get () -> (String) } define Internal { create () { return Internal{ } } get () { return "message" } } define Test { run () { String value1 <- Internal.create().get() if (value1 != "message") { fail(value1) } Int value2 <- Getter.getValue() if (value2 != 1) { fail(value2) } Int value3 <- Getter2.getValue() if (value3 != 2) { fail(value3) } } } concrete Test { @type run () -> () }