https://github.com/shader-slang/slang
Raw File
Tip revision: 15335549340c54fd7b89b28104ddc907e9c64638 authored by jsmall-nvidia on 12 December 2019, 19:53:44 UTC
Use DownstreamCompiler for all downstream compilers (#1152)
Tip revision: 1533554
local-used-in-own-declaration.slang
//DIAGNOSTIC_TEST:SIMPLE:-target dxbc -profile ps_5_0

// Early versions of the front-end had bugs when local
// variables were used before their definition, or
// were defined using a reference to themselves.
//
// This file tries to ensure that we emit proper error
// diagnostics in these cases.

void usedInOwnDeclaration()
{
	int e = e;
}

float4 main()
{
	usedInOwnDeclaration();
	return 0;
}
back to top