main.mx raw

   1  // expected: cannot refer to unexported method seal
   2  //
   3  // An interface method whose name is unexported belongs to the package that
   4  // declares the interface; another package cannot name it. Legacy reports
   5  // "s.seal undefined (cannot refer to unexported method seal)" and stage4 used
   6  // to compile the call and dispatch on the name.
   7  package main
   8  
   9  import "tests/restrictions/lib/unexported"
  10  
  11  func main() {
  12  	s := unexported.Make(1)
  13  	println(s.seal())
  14  }
  15