summaryrefslogtreecommitdiffstats
path: root/tests/diagnostics/non-standard-extension.slang
blob: d6a4350a40977199f42ce2bfeca59b4428c0cf40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//TEST:SIMPLE(filecheck=CHECK): -warnings-as-errors 30856

interface ICompatibleWith<T> {}
interface IBase {}
struct INT : IBase {}
struct FLOAT : IBase {}

extension<EX : IBase> EX : ICompatibleWith<INT> {}
extension<EY : IBase> EY : ICompatibleWith<FLOAT> {}

struct VECTOR<T> {}

// CHECK: ([[# @LINE+1]]): error 30856: the extension is non-standard
extension<T, U : ICompatibleWith<T>> VECTOR<U> : ICompatibleWith<VECTOR<T>> {}

void main()
{}