...
Run Format

Source file test/fixedbugs/issue20227.go

Documentation: test/fixedbugs

     1  // errorcheck
     2  
     3  // Copyright 2017 The Go Authors. All rights reserved.
     4  // Use of this source code is governed by a BSD-style
     5  // license that can be found in the LICENSE file.
     6  
     7  // Issue 20227: panic while constructing constant "1i/1e-600000000"
     8  
     9  package p
    10  
    11  var _ = 1 / 1e-600000000i  // ERROR "complex division by zero"
    12  var _ = 1i / 1e-600000000  // ERROR "complex division by zero"
    13  var _ = 1i / 1e-600000000i // ERROR "complex division by zero"
    14  
    15  var _ = 1 / (1e-600000000 + 1e-600000000i)  // ERROR "complex division by zero"
    16  var _ = 1i / (1e-600000000 + 1e-600000000i) // ERROR "complex division by zero"
    17  

View as plain text