dot_import.mx raw

   1  // A dot import that is used must still compile and run.
   2  //
   3  // The unused-import check has to tell a used dot import from an unused one by
   4  // looking for the imported package's exported names in the file. Getting that
   5  // wrong in the strict direction would refuse this program, and in the lenient
   6  // direction would let the unused case through - reject_unused_dot_import holds
   7  // the other half down.
   8  package main
   9  
  10  import . "math"
  11  
  12  func main() {
  13  	if MaxInt32 != 2147483647 {
  14  		panic("dot import resolved to the wrong value")
  15  	}
  16  	println(int32(MaxInt32))
  17  }
  18