// generic-type-arg-overloaded.slang //DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): // Regression test to confirm that type checker // doesn't crash when an overloaded identifier // is used as a generic type argument. interface IThing { int getVal(); } struct Stuff : IThing { int getVal() { return 1; } } // Conflicting declaration: //CHECK: ([[# @LINE+1]]): error 30200: struct Stuff {} int util() { return 1; } struct G {} int nonGeneric() { return 2; } int test() { // This call should note the ambiguity, // rather than crash. // return util() // Adding an extra call to also test the // case of trying to speicalize something // like a generic when it isn't one. // + nonGeneric(); }