Files
swift-mirror/test/SIL/Parser/error_in_global.sil
Erik Eckstein cb249e8956 SIL Parser: abort parsing a sil_global if there is an error in an initializer instruction
Otherwise the parser ends up printing errors indefinitely.
2024-05-15 17:43:19 +02:00

16 lines
356 B
Plaintext

// RUN: %target-sil-opt -inline -verify %s
// Check that the parser doesn't end up in an infinite error loop in case there is an error in a sil_global
sil_stage canonical
import Builtin
import Swift
import SwiftShims
sil_global @referencing_object : $Int = {
%initval = struct $Int_ ()
// expected-error @-1 {{cannot find type 'Int_' in scope}}
}