import 가 만든 binding 으로 다른 유닛의 선언에 닿는다. 호출, 구조체 리터럴, 값 참조 세 자리다. 시그니처의 타입은 그 시그니처가 쓰인 유닛에서 해석한다 -- 호출한 쪽에서 해석하면 같은 이름이 다른 타입을 가리킨다. pub 없는 선언과 필드는 자기 유닛 밖에서 보이지 않는다. error.Name 은 구현된 적이 없었다. 기본 에러 집합 core.Error 의 멤버이고, 그 집합은 선언이 아니라 수집으로 채워지므로 변이 목록 없이 정체성만 갖는다. units 34/34. dotpriv/main 은 위반이 있는 유닛을 import 하므로 받아들여질 수 없다 -- 마커를 붙이고 이유를 적었다.
9 lines
263 B
Plaintext
9 lines
263 B
Plaintext
// ERROR:private
|
|
// The violation is in game/bar.fe, which this unit imports. Reaching it from
|
|
// any entry has to be rejected, so the marker pins the message and not a line
|
|
// in another file.
|
|
unit main;
|
|
import game.bar;
|
|
|
|
fn main() -> i32 { return bar.read(); }
|