Added range highlighting to SkSL error reports
SkSL errors now identify the specific range of code they are describing, rather than just the line number. Change-Id: Ifabb3148476f9b4cd8e532f23e5b38e1cf33a87e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528039 Reviewed-by: John Stiles <johnstiles@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This commit is contained in:
parent
b019e94c44
commit
cb13c892af
@ -755,10 +755,61 @@ bool Compiler::toMetal(Program& program, std::string* out) {
|
||||
|
||||
void Compiler::handleError(std::string_view msg, Position pos) {
|
||||
fErrorText += "error: ";
|
||||
bool printLocation = false;
|
||||
std::string_view src = this->errorReporter().source();
|
||||
int line = -1;
|
||||
if (pos.valid()) {
|
||||
fErrorText += std::to_string(pos.line(this->errorReporter().source())) + ": ";
|
||||
line = pos.line();
|
||||
if (line == -1) {
|
||||
line = pos.line(src);
|
||||
printLocation = pos.startOffset() < (int)src.length();
|
||||
}
|
||||
fErrorText += std::to_string(line) + ": ";
|
||||
}
|
||||
fErrorText += std::string(msg) + "\n";
|
||||
if (printLocation) {
|
||||
// Find the beginning of the line
|
||||
int lineStart = pos.startOffset();
|
||||
while (lineStart > 0) {
|
||||
if (src[lineStart - 1] == '\n') {
|
||||
break;
|
||||
}
|
||||
--lineStart;
|
||||
}
|
||||
|
||||
// echo the line
|
||||
for (int i = lineStart; i < (int)src.length(); i++) {
|
||||
switch (src[i]) {
|
||||
case '\t': fErrorText += " "; break;
|
||||
case '\0': fErrorText += " "; break;
|
||||
case '\n': i = src.length(); break;
|
||||
default: fErrorText += src[i]; break;
|
||||
}
|
||||
}
|
||||
fErrorText += '\n';
|
||||
|
||||
// print the carets underneath it, pointing to the range in question
|
||||
for (int i = lineStart; i < (int)src.length(); i++) {
|
||||
if (i >= pos.endOffset()) {
|
||||
break;
|
||||
}
|
||||
switch (src[i]) {
|
||||
case '\t':
|
||||
fErrorText += (i >= pos.startOffset()) ? "^^^^" : " ";
|
||||
break;
|
||||
case '\n':
|
||||
SkASSERT(i >= pos.startOffset());
|
||||
// use an ellipsis if the error continues past the end of the line
|
||||
fErrorText += (pos.endOffset() > i + 1) ? "..." : "^";
|
||||
i = src.length();
|
||||
break;
|
||||
default:
|
||||
fErrorText += (i >= pos.startOffset()) ? '^' : ' ';
|
||||
break;
|
||||
}
|
||||
}
|
||||
fErrorText += '\n';
|
||||
}
|
||||
}
|
||||
|
||||
std::string Compiler::errorText(bool showCount) {
|
||||
|
@ -327,8 +327,8 @@ void DSLParser::declarations() {
|
||||
this->directive();
|
||||
break;
|
||||
case Token::Kind::TK_INVALID: {
|
||||
this->nextToken();
|
||||
this->error(this->peek(), "invalid token");
|
||||
this->nextToken();
|
||||
done = true;
|
||||
break;
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ public:
|
||||
if (!param->type().isStruct() && paramInout == Modifiers::Flag::kOut_Flag) {
|
||||
ProgramUsage::VariableCounts counts = fUsage.get(*param);
|
||||
if (counts.fWrite <= 0) {
|
||||
fContext.fErrors->error(funcDef.body()->fPosition,
|
||||
fContext.fErrors->error(param->fPosition,
|
||||
"function '" + std::string(funcDecl.name()) +
|
||||
"' never assigns a value to out parameter '" +
|
||||
std::string(param->name()) + "'");
|
||||
|
@ -2092,7 +2092,7 @@ void MetalCodeGenerator::writeFields(const std::vector<Type::Field>& fields, Pos
|
||||
}
|
||||
if (fieldOffset != -1) {
|
||||
if (currentOffset > fieldOffset) {
|
||||
fContext.fErrors->error(parentPos,
|
||||
fContext.fErrors->error(field.fPosition,
|
||||
"offset of field '" + std::string(field.fName) +
|
||||
"' must be at least " + std::to_string(currentOffset));
|
||||
return;
|
||||
@ -2106,7 +2106,7 @@ void MetalCodeGenerator::writeFields(const std::vector<Type::Field>& fields, Pos
|
||||
}
|
||||
int alignment = memoryLayout.alignment(*fieldType);
|
||||
if (fieldOffset % alignment) {
|
||||
fContext.fErrors->error(parentPos,
|
||||
fContext.fErrors->error(field.fPosition,
|
||||
"offset of field '" + std::string(field.fName) +
|
||||
"' must be a multiple of " + std::to_string(alignment));
|
||||
return;
|
||||
|
@ -498,11 +498,11 @@ void SPIRVCodeGenerator::writeStruct(const Type& type, const MemoryLayout& memor
|
||||
const Layout& fieldLayout = field.fModifiers.fLayout;
|
||||
if (fieldLayout.fOffset >= 0) {
|
||||
if (fieldLayout.fOffset < (int) offset) {
|
||||
fContext.fErrors->error(type.fPosition, "offset of field '" +
|
||||
fContext.fErrors->error(field.fPosition, "offset of field '" +
|
||||
std::string(field.fName) + "' must be at least " + std::to_string(offset));
|
||||
}
|
||||
if (fieldLayout.fOffset % alignment) {
|
||||
fContext.fErrors->error(type.fPosition,
|
||||
fContext.fErrors->error(field.fPosition,
|
||||
"offset of field '" + std::string(field.fName) +
|
||||
"' must be a multiple of " + std::to_string(alignment));
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ DSLStatement::DSLStatement(DSLPossibleStatement stmt, Position pos) {
|
||||
} else {
|
||||
fStatement = SkSL::Nop::Make();
|
||||
}
|
||||
if (pos.valid()) {
|
||||
if (pos.valid() && !fStatement->fPosition.valid()) {
|
||||
fStatement->fPosition = pos;
|
||||
}
|
||||
}
|
||||
|
@ -340,8 +340,8 @@ static bool find_existing_declaration(const Context& context,
|
||||
}
|
||||
for (size_t i = 0; i < parameters.size(); i++) {
|
||||
if (parameters[i]->modifiers() != other->parameters()[i]->modifiers()) {
|
||||
errors.error(pos, "modifiers on parameter " + std::to_string(i + 1) +
|
||||
" differ between declaration and definition");
|
||||
errors.error(parameters[i]->fPosition, "modifiers on parameter " +
|
||||
std::to_string(i + 1) + " differ between declaration and definition");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -180,9 +180,9 @@ std::unique_ptr<FunctionDefinition> FunctionDefinition::Convert(const Context& c
|
||||
std::move(returnStmt.expression()), fContext));
|
||||
} else {
|
||||
// Returning something from a function with a void return type.
|
||||
returnStmt.setExpression(nullptr);
|
||||
fContext.fErrors->error(returnStmt.fPosition,
|
||||
fContext.fErrors->error(returnStmt.expression()->fPosition,
|
||||
"may not return a value from a void function");
|
||||
returnStmt.setExpression(nullptr);
|
||||
}
|
||||
} else {
|
||||
if (this->functionReturnsValue()) {
|
||||
|
@ -37,8 +37,9 @@ std::unique_ptr<Expression> TernaryExpression::Convert(const Context& context,
|
||||
if (!equalityOp.determineBinaryType(context, ifTrue->type(), ifFalse->type(),
|
||||
&trueType, &falseType, &resultType) ||
|
||||
!trueType->matches(*falseType)) {
|
||||
context.fErrors->error(pos, "ternary operator result mismatch: '" +
|
||||
ifTrue->type().displayName() + "', '" + ifFalse->type().displayName() + "'");
|
||||
context.fErrors->error(ifTrue->fPosition.rangeThrough(ifFalse->fPosition),
|
||||
"ternary operator result mismatch: '" + ifTrue->type().displayName() + "', '" +
|
||||
ifFalse->type().displayName() + "'");
|
||||
return nullptr;
|
||||
}
|
||||
if (context.fConfig->strictES2Mode() && trueType->isOrContainsArray()) {
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 6: call to 'foo' expected 1 argument, but found 2
|
||||
float x = foo(1, 2);
|
||||
^^^^^^^^^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 6: expected 'float', but found 'bool'
|
||||
float x = foo(true);
|
||||
^^^^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 2: modifiers on parameter 1 differ between declaration and definition
|
||||
void test(out int x) {}
|
||||
^^^^^^^^^
|
||||
1 error
|
||||
|
@ -1,6 +1,12 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: invalid arguments to 'float[2]' constructor (expected 2 elements, but found 0)
|
||||
float noElements[2] = float[2]();
|
||||
^^^^^^^^^^
|
||||
error: 2: invalid arguments to 'float[2]' constructor (expected 2 elements, but found 1)
|
||||
float notEnoughElements[2] = float[2](1);
|
||||
^^^^^^^^^^^
|
||||
error: 4: invalid arguments to 'float[2]' constructor (expected 2 elements, but found 3)
|
||||
float tooManyElements[2] = float[2](1, 2, 3);
|
||||
^^^^^^^^^^^^^^^^^
|
||||
3 errors
|
||||
|
@ -1,8 +1,18 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: index -1 out of range for 'int[123]'
|
||||
void array_neg1 () { int a[123]; int v = a[-1]; }
|
||||
^^
|
||||
error: 4: index 123 out of range for 'half4x4[123]'
|
||||
void array_123 () { half4x4 a[123]; half4x4 v = a[123]; }
|
||||
^^^
|
||||
error: 5: index 1000000000 out of range for 'int4[123]'
|
||||
void array_huge () { int4 a[123]; int4 v = a[1000000000]; }
|
||||
^^^^^^^^^^
|
||||
error: 6: index 3000000000 out of range for 'half3[123]'
|
||||
void array_overflow () { half3 a[123]; half3 v = a[3000000000]; }
|
||||
^^^^^^^^^^
|
||||
error: 7: missing index in '[]'
|
||||
void array_no_index () { int a[123]; int v = a[]; }
|
||||
^^
|
||||
5 errors
|
||||
|
@ -1,5 +1,9 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 11: index -1 out of range for 'int[3]'
|
||||
int undefined = indexArray(-1) + indexArray(3);
|
||||
^^
|
||||
error: 11: index 3 out of range for 'int[3]'
|
||||
int undefined = indexArray(-1) + indexArray(3);
|
||||
^
|
||||
2 errors
|
||||
|
@ -1,9 +1,21 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: '-' cannot operate on 'int[123]'
|
||||
void array_negate_int () { int a[123]; -a; }
|
||||
^^
|
||||
error: 2: '-' cannot operate on 'int4[123]'
|
||||
void array_negate_int4 () { int4 a[123]; -a; }
|
||||
^^
|
||||
error: 3: '-' cannot operate on 'float[123]'
|
||||
void array_negate_float () { float a[123]; -a; }
|
||||
^^
|
||||
error: 4: '-' cannot operate on 'half3[123]'
|
||||
void array_negate_half3 () { half3 a[123]; -a; }
|
||||
^^
|
||||
error: 5: '-' cannot operate on 'bool2[123]'
|
||||
void array_negate_bool2 () { bool2 a[123]; -a; }
|
||||
^^
|
||||
error: 6: '-' cannot operate on 'half4x4[123]'
|
||||
void array_negate_half4x4() { half4x4 a[123]; -a; }
|
||||
^^
|
||||
6 errors
|
||||
|
@ -1,26 +1,72 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: array size must be positive
|
||||
void a1() { float[-2]; }
|
||||
^^
|
||||
error: 2: array size must be positive
|
||||
void b1() { float[-1]; }
|
||||
^^
|
||||
error: 3: array size must be positive
|
||||
void c1() { float[0]; }
|
||||
^
|
||||
error: 4: expected 'int', but found 'float'
|
||||
void d1() { float[1.5]; }
|
||||
^^^
|
||||
error: 5: integer is out of range for type 'int': 4000000000
|
||||
void e1() { float[4000000000]; }
|
||||
^^^^^^^^^^
|
||||
error: 5: array size must be positive
|
||||
void e1() { float[4000000000]; }
|
||||
^^^^^^^^^^
|
||||
error: 6: expected 'int', but found 'bool'
|
||||
void f1() { float[true]; }
|
||||
^^^^
|
||||
error: 7: expected 'int', but found 'bool'
|
||||
void g1() { float[false]; }
|
||||
^^^^^
|
||||
error: 8: expected 'int', but found 'int2'
|
||||
void h1() { float[int2(2, 2)]; }
|
||||
^^^^^^^^^^
|
||||
error: 9: missing index in '[]'
|
||||
void i1() { float[]; }
|
||||
^^
|
||||
error: 10: integer is out of range for type 'int': 4000000000
|
||||
void j1() { float[int3(4000000000)]; }
|
||||
^^^^^^^^^^
|
||||
error: 11: integer is out of range for type 'int': 100000002004087734272
|
||||
void k1() { float[int(1e20)]; }
|
||||
^^^^
|
||||
error: 13: array size must be positive
|
||||
void a2() { float x[-2]; }
|
||||
^^
|
||||
error: 14: array size must be positive
|
||||
void b2() { float x[-1]; }
|
||||
^^
|
||||
error: 15: array size must be positive
|
||||
void c2() { float x[0]; }
|
||||
^
|
||||
error: 16: array size must be an integer
|
||||
void d2() { float x[1.5]; }
|
||||
^^^
|
||||
error: 17: array size out of bounds
|
||||
void e2() { float x[4000000000]; }
|
||||
^^^^^^^^^^
|
||||
error: 18: array size must be an integer
|
||||
void f2() { float x[true]; }
|
||||
^^^^
|
||||
error: 19: array size must be an integer
|
||||
void g2() { float x[false]; }
|
||||
^^^^^
|
||||
error: 20: array size must be an integer
|
||||
void h2() { float x[int2(2, 2)]; }
|
||||
^^^^^^^^^^
|
||||
error: 21: expected array dimension
|
||||
void i2() { float x[]; }
|
||||
^^
|
||||
error: 22: integer is out of range for type 'int': 4000000000
|
||||
void j2() { float x[int3(4000000000)]; }
|
||||
^^^^^^^^^^
|
||||
error: 23: integer is out of range for type 'int': 100000002004087734272
|
||||
void k2() { float x[int(1e20)]; }
|
||||
^^^^
|
||||
23 errors
|
||||
|
@ -1,10 +1,24 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: type 'void' may not be used in an array
|
||||
void a[2];
|
||||
^^^^^^^^^
|
||||
error: 2: type 'void' may not be used in an array
|
||||
void[2] b;
|
||||
^^^^^^^
|
||||
error: 4: type 'void' may not be used in an array
|
||||
void[2] funcF() {}
|
||||
^^^^^^^
|
||||
error: 4: function 'funcF' can exit without returning a value
|
||||
void[2] funcF() {}
|
||||
^^
|
||||
error: 5: type 'void' may not be used in an array
|
||||
void funcG() { void g[2]; }
|
||||
^^^^^^^^^
|
||||
error: 6: type 'void' may not be used in an array
|
||||
void funcH() { void[2] h; }
|
||||
^^^^^^^
|
||||
error: 7: type 'void' may not be used in an array
|
||||
void funcI() { void[2]; }
|
||||
^^^^^^^
|
||||
7 errors
|
||||
|
@ -1,9 +1,21 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: '+' cannot operate on 'int[123]'
|
||||
void array_plus_int () { int a[123]; +a; }
|
||||
^^
|
||||
error: 2: '+' cannot operate on 'int4[123]'
|
||||
void array_plus_int4 () { int4 a[123]; +a; }
|
||||
^^
|
||||
error: 3: '+' cannot operate on 'float[123]'
|
||||
void array_plus_float () { float a[123]; +a; }
|
||||
^^
|
||||
error: 4: '+' cannot operate on 'half3[123]'
|
||||
void array_plus_half3 () { half3 a[123]; +a; }
|
||||
^^
|
||||
error: 5: '+' cannot operate on 'bool2[123]'
|
||||
void array_plus_bool2 () { bool2 a[123]; +a; }
|
||||
^^
|
||||
error: 6: '+' cannot operate on 'half4x4[123]'
|
||||
void array_plus_half4x4() { half4x4 a[123]; +a; }
|
||||
^^
|
||||
6 errors
|
||||
|
@ -1,5 +1,9 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: functions may not return type 'float4x4[2]'
|
||||
float4x4[2] return_float4x4_2() {}
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 2: functions may not return type 'int[1]'
|
||||
int[1] return_int_1() {}
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
2 errors
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: multi-dimensional arrays are not supported
|
||||
float[2] x[2];
|
||||
^^^^^^^^^^^^^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: multi-dimensional arrays are not supported
|
||||
void func() { float[2] x[2]; }
|
||||
^^^^^^^^^^^^^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: multi-dimensional arrays are not supported
|
||||
void func(float[2] x[2]) {}
|
||||
^^^^^^^^^^^^^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: multi-dimensional arrays are not supported
|
||||
struct S { float[2] x[2]; };
|
||||
^^^^^^^^^^^^^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: multi-dimensional arrays are not supported
|
||||
float x[2][2];
|
||||
^^^^^^^^^^^^^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: multi-dimensional arrays are not supported
|
||||
void func() { float x[2][2]; }
|
||||
^^^^^^^^^^^^^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: multi-dimensional arrays are not supported
|
||||
void func(float x[2][2]) {}
|
||||
^^^^^^^^^^^^^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: multi-dimensional arrays are not supported
|
||||
struct S { float x[2][2]; };
|
||||
^^^^^^^^^^^^^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: multi-dimensional arrays are not supported
|
||||
float[2][2] x;
|
||||
^^^^^^^^^^^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: multi-dimensional arrays are not supported
|
||||
void func() { float[2][2] x; }
|
||||
^^^^^^^^^^^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: multi-dimensional arrays are not supported
|
||||
void func(float[2][2] x) {}
|
||||
^^^^^^^^^^^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: multi-dimensional arrays are not supported
|
||||
struct S { float[2][2] x; };
|
||||
^^^^^^^^^^^
|
||||
1 error
|
||||
|
@ -1,7 +1,15 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: expected array dimension
|
||||
int arrUnsized[];
|
||||
^^
|
||||
error: 2: array size must be an integer
|
||||
int arrFloat[1.];
|
||||
^^
|
||||
error: 3: array size must be an integer
|
||||
int arrBool[true];
|
||||
^^^^
|
||||
error: 5: missing index in '[]'
|
||||
int unsized_in_expression() { return int[](0)[0]; }
|
||||
^^
|
||||
4 errors
|
||||
|
@ -1,10 +1,24 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: expected 'int', but found 'float'
|
||||
void vardecl_assign_float_to_int() { int x = 1.0; }
|
||||
^^^
|
||||
error: 2: type mismatch: '=' cannot operate on 'int', 'float'
|
||||
void statement_assign_float_to_int() { int x; x = 1.0; }
|
||||
^^^^^^^
|
||||
error: 3: type mismatch: '*=' cannot operate on 'int3', 'float'
|
||||
void times_equals_int3_by_float() { int3 x = int3(0); x *= 1.0; }
|
||||
^^^^^^^^
|
||||
error: 4: expected '(' to begin function call
|
||||
void function_ref_in_comma_expr() { int x = (radians, 1); }
|
||||
^
|
||||
error: 5: expected '(' to begin constructor invocation
|
||||
void type_ref_in_comma_expr() { int x = (bool4, 1); }
|
||||
^
|
||||
error: 6: expected '(' to begin function call
|
||||
int function_ref_in_global_variable = mix;
|
||||
^
|
||||
error: 7: expected '(' to begin constructor invocation
|
||||
float3x3 type_ref_in_global_variable = float3x3;
|
||||
^
|
||||
7 errors
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: unknown capability flag 'bugFreeDriver'
|
||||
bool b = sk_Caps.bugFreeDriver;
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
1 error
|
||||
|
@ -1,10 +1,24 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 16: 'const' variable initializer must be a constant expression
|
||||
void from_uniform() { const float x = u; }
|
||||
^
|
||||
error: 17: 'const' variable initializer must be a constant expression
|
||||
void from_parameter(float p) { const float x = p; }
|
||||
^
|
||||
error: 18: 'const' variable initializer must be a constant expression
|
||||
void from_const_parameter(const float p) { const float x = p; }
|
||||
^
|
||||
error: 19: 'const' variable initializer must be a constant expression
|
||||
void from_non_const_local() { float x = u; const float y = x; }
|
||||
^
|
||||
error: 20: 'const' variable initializer must be a constant expression
|
||||
void from_non_const_expression() { const float x = u + u; }
|
||||
^^^^^
|
||||
error: 21: 'const' variable initializer must be a constant expression
|
||||
void from_mixed_expression() { const float x = c + u; }
|
||||
^^^^^
|
||||
error: 22: 'const' variable initializer must be a constant expression
|
||||
void from_non_const_struct_field() { const float x = s.f; }
|
||||
^^^
|
||||
7 errors
|
||||
|
@ -1,8 +1,18 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 3: type 'S' does not have a field named 'missing'
|
||||
void not_a_field() { S s; s.missing = 123; }
|
||||
^^^^^^^^^
|
||||
error: 4: not a function
|
||||
void not_a_function() { S s; s.f(); }
|
||||
^^^^^
|
||||
error: 5: type mismatch: '=' cannot operate on 'float', 'bool3'
|
||||
void not_a_bvec() { S s; s.f = bool3(true); }
|
||||
^^^^^^^^^^^^^^^^^
|
||||
error: 6: invalid swizzle component 'm'
|
||||
void not_a_struct() { S s; s.f.missing; }
|
||||
^^^^^^^^^^^
|
||||
error: 7: expected array, but found 'float'
|
||||
void not_an_array() { S s; s.f[0]; }
|
||||
^^^
|
||||
5 errors
|
||||
|
@ -1,5 +1,9 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: expected array, but found 'int'
|
||||
void int_not_array() { int x = 2[0]; }
|
||||
^
|
||||
error: 2: expected array, but found 'float'
|
||||
void index_float2_twice() { float2 x = float2(0); int y = x[0][0]; }
|
||||
^^^^
|
||||
2 errors
|
||||
|
@ -1,21 +1,57 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: 'const' is not permitted here
|
||||
const in out uniform flat noperspective sk_has_side_effects inline noinline void func1() {}
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 1: 'in' is not permitted here
|
||||
const in out uniform flat noperspective sk_has_side_effects inline noinline void func1() {}
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 1: 'out' is not permitted here
|
||||
const in out uniform flat noperspective sk_has_side_effects inline noinline void func1() {}
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 1: 'uniform' is not permitted here
|
||||
const in out uniform flat noperspective sk_has_side_effects inline noinline void func1() {}
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 1: 'flat' is not permitted here
|
||||
const in out uniform flat noperspective sk_has_side_effects inline noinline void func1() {}
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 1: 'noperspective' is not permitted here
|
||||
const in out uniform flat noperspective sk_has_side_effects inline noinline void func1() {}
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 1: functions cannot be both 'inline' and 'noinline'
|
||||
const in out uniform flat noperspective sk_has_side_effects inline noinline void func1() {}
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 3: 'uniform' is not permitted here
|
||||
void func2(const in out uniform flat noperspective sk_has_side_effects
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
|
||||
error: 3: 'flat' is not permitted here
|
||||
void func2(const in out uniform flat noperspective sk_has_side_effects
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
|
||||
error: 3: 'noperspective' is not permitted here
|
||||
void func2(const in out uniform flat noperspective sk_has_side_effects
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
|
||||
error: 3: 'sk_has_side_effects' is not permitted here
|
||||
void func2(const in out uniform flat noperspective sk_has_side_effects
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
|
||||
error: 3: 'inline' is not permitted here
|
||||
void func2(const in out uniform flat noperspective sk_has_side_effects
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
|
||||
error: 3: 'noinline' is not permitted here
|
||||
void func2(const in out uniform flat noperspective sk_has_side_effects
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
|
||||
error: 6: 'in uniform' variables not permitted
|
||||
const in out uniform flat noperspective sk_has_side_effects inline noinline float var;
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 6: 'sk_has_side_effects' is not permitted here
|
||||
const in out uniform flat noperspective sk_has_side_effects inline noinline float var;
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 6: 'inline' is not permitted here
|
||||
const in out uniform flat noperspective sk_has_side_effects inline noinline float var;
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 6: 'noinline' is not permitted here
|
||||
const in out uniform flat noperspective sk_has_side_effects inline noinline float var;
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 6: 'const' variables must be initialized
|
||||
const in out uniform flat noperspective sk_has_side_effects inline noinline float var;
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
18 errors
|
||||
|
@ -1,5 +1,9 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: '08' is not a valid octal number
|
||||
int i1 = 08;
|
||||
^^
|
||||
error: 1: expected expression, but found '08'
|
||||
int i1 = 08;
|
||||
^^
|
||||
2 errors
|
||||
|
@ -1,15 +1,39 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 2: type mismatch: '*' cannot operate on '<INVALID>', 'int'
|
||||
float x = functionLeft * 2;
|
||||
^^^^^^^^^^^^^^^^
|
||||
error: 6: type mismatch: '*' cannot operate on 'int', '<INVALID>'
|
||||
float x = 2 * functionRight;
|
||||
^^^^^^^^^^^^^^^^^
|
||||
error: 10: type mismatch: '*' cannot operate on '<INVALID>', '<INVALID>'
|
||||
float x = functionBoth * functionBoth;
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 18: type mismatch: '*' cannot operate on 'S', 'int'
|
||||
float x = s * 2;
|
||||
^^^^^
|
||||
error: 22: type mismatch: '*' cannot operate on 'int', 'S'
|
||||
float x = 2 * s;
|
||||
^^^^^
|
||||
error: 26: type mismatch: '*' cannot operate on 'S', 'S'
|
||||
float x = s * s;
|
||||
^^^^^
|
||||
error: 32: type mismatch: '*' cannot operate on 'shader', 'int'
|
||||
float x = shad * 2;
|
||||
^^^^^^^^
|
||||
error: 36: type mismatch: '*' cannot operate on 'int', 'shader'
|
||||
float x = 2 * shad;
|
||||
^^^^^^^^
|
||||
error: 40: type mismatch: '*' cannot operate on 'shader', 'shader'
|
||||
float x = shad * shad;
|
||||
^^^^^^^^^^^
|
||||
error: 46: type mismatch: '*' cannot operate on 'int[1]', 'int'
|
||||
float x = array * 2;
|
||||
^^^^^^^^^
|
||||
error: 50: type mismatch: '*' cannot operate on 'int', 'int[1]'
|
||||
float x = 2 * array;
|
||||
^^^^^^^^^
|
||||
error: 54: type mismatch: '*' cannot operate on 'int[1]', 'int[1]'
|
||||
float x = array * array;
|
||||
^^^^^^^^^^^^^
|
||||
12 errors
|
||||
|
@ -1,23 +1,63 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 11: type mismatch: '=' cannot operate on 'half', 'float'
|
||||
void scalar_times_scalar_disallowed_1() { H = F * H; }
|
||||
^^^^^^^^^
|
||||
error: 12: type mismatch: '=' cannot operate on 'half', 'float'
|
||||
void scalar_times_scalar_disallowed_2() { H = H * F; }
|
||||
^^^^^^^^^
|
||||
error: 13: type mismatch: '*=' cannot operate on 'half', 'float'
|
||||
void scalar_times_scalar_disallowed_3() { H *= F; }
|
||||
^^^^^^
|
||||
error: 18: type mismatch: '=' cannot operate on 'half4', 'float4'
|
||||
void vector_times_vector_disallowed_1() { H4 = F4 * H4; }
|
||||
^^^^^^^^^^^^
|
||||
error: 19: type mismatch: '=' cannot operate on 'half4', 'float4'
|
||||
void vector_times_vector_disallowed_2() { H4 = H4 * F4; }
|
||||
^^^^^^^^^^^^
|
||||
error: 20: type mismatch: '*=' cannot operate on 'half4', 'float4'
|
||||
void vector_times_vector_disallowed_3() { H4 *= F4; }
|
||||
^^^^^^^^
|
||||
error: 24: type mismatch: '=' cannot operate on 'half4', 'float4'
|
||||
void scalar_times_vector_disallowed_1() { H4 = F * H4; }
|
||||
^^^^^^^^^^^
|
||||
error: 25: type mismatch: '=' cannot operate on 'half4', 'float4'
|
||||
void scalar_times_vector_disallowed_2() { H4 = H * F4; }
|
||||
^^^^^^^^^^^
|
||||
error: 30: type mismatch: '=' cannot operate on 'half4', 'float4'
|
||||
void vector_times_scalar_disallowed_1() { H4 = F4 * H; }
|
||||
^^^^^^^^^^^
|
||||
error: 31: type mismatch: '=' cannot operate on 'half4', 'float4'
|
||||
void vector_times_scalar_disallowed_2() { H4 = H4 * F; }
|
||||
^^^^^^^^^^^
|
||||
error: 32: type mismatch: '*=' cannot operate on 'half4', 'float'
|
||||
void vector_times_scalar_disallowed_3() { H4 *= F; }
|
||||
^^^^^^^
|
||||
error: 36: type mismatch: '=' cannot operate on 'half4', 'float4'
|
||||
void matrix_times_vector_disallowed_1() { H4 = F4x4 * H4; }
|
||||
^^^^^^^^^^^^^^
|
||||
error: 37: type mismatch: '=' cannot operate on 'half4', 'float4'
|
||||
void matrix_times_vector_disallowed_2() { H4 = H4x4 * F4; }
|
||||
^^^^^^^^^^^^^^
|
||||
error: 42: type mismatch: '=' cannot operate on 'half4', 'float4'
|
||||
void vector_times_matrix_disallowed_1() { H4 = F4 * H4x4; }
|
||||
^^^^^^^^^^^^^^
|
||||
error: 43: type mismatch: '=' cannot operate on 'half4', 'float4'
|
||||
void vector_times_matrix_disallowed_2() { H4 = H4 * F4x4; }
|
||||
^^^^^^^^^^^^^^
|
||||
error: 44: type mismatch: '*=' cannot operate on 'half4', 'float4x4'
|
||||
void vector_times_matrix_disallowed_3() { H4 *= F4x4; }
|
||||
^^^^^^^^^^
|
||||
error: 49: type mismatch: '=' cannot operate on 'half4x4', 'float4x4'
|
||||
void matrix_times_matrix_disallowed_1() { H4x4 = F4x4 * H4x4; }
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
error: 50: type mismatch: '=' cannot operate on 'half4x4', 'float4x4'
|
||||
void matrix_times_matrix_disallowed_2() { H4x4 = H4x4 * F4x4; }
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
error: 51: type mismatch: '*=' cannot operate on 'half4x4', 'float4x4'
|
||||
void matrix_times_matrix_disallowed_3() { H4x4 *= F4x4; }
|
||||
^^^^^^^^^^^^
|
||||
error: 55: type mismatch: '*=' cannot operate on 'float4x4', 'float4'
|
||||
void dimensions_disallowed_1() { F4x4 *= F4; }
|
||||
^^^^^^^^^^
|
||||
20 errors
|
||||
|
@ -1,11 +1,27 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: type mismatch: '*' cannot operate on 'int', 'bool'
|
||||
void int_times_bool() { float x = 3 * true; }
|
||||
^^^^^^^^
|
||||
error: 2: type mismatch: '||' cannot operate on 'int', 'float'
|
||||
void int_or_float() { bool x = 1 || 2.0; }
|
||||
^^^^^^^^
|
||||
error: 3: type mismatch: '==' cannot operate on 'float2', 'int'
|
||||
void float2_eq_int() { bool x = float2(0) == 0; }
|
||||
^^^^^^^^^^^^^^
|
||||
error: 4: type mismatch: '!=' cannot operate on 'float2', 'int'
|
||||
void float2_neq_int() { bool x = float2(0) != 0; }
|
||||
^^^^^^^^^^^^^^
|
||||
error: 5: type mismatch: '^^' cannot operate on 'int', 'int'
|
||||
void int_logicalxor_int() { bool x = 8 ^^ 6; }
|
||||
^^^^^^
|
||||
error: 7: type mismatch: '<' cannot operate on 'float2', 'float2'
|
||||
void float2_lt_float2() { bool x = float2(0) < float2(1); }
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 8: type mismatch: '<' cannot operate on 'float2', 'float'
|
||||
void float2_lt_float() { bool x = float2(0) < 0.0; }
|
||||
^^^^^^^^^^^^^^^
|
||||
error: 9: type mismatch: '<' cannot operate on 'float', 'float2'
|
||||
void float_lt_float2() { bool x = 0.0 < float2(0); }
|
||||
^^^^^^^^^^^^^^^
|
||||
8 errors
|
||||
|
@ -1,13 +1,33 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 5: type mismatch: '>>=' cannot operate on 'float', 'int'
|
||||
void shr_eq() { x >>= 1; }
|
||||
^^^^^^^
|
||||
error: 6: type mismatch: '<<=' cannot operate on 'float', 'int'
|
||||
void shl_eq() { x <<= 1; }
|
||||
^^^^^^^
|
||||
error: 7: type mismatch: '&=' cannot operate on 'float', 'int'
|
||||
void and_eq() { x &= 1; }
|
||||
^^^^^^^
|
||||
error: 8: type mismatch: '|=' cannot operate on 'float', 'int'
|
||||
void or_eq() { x |= 1; }
|
||||
^^^^^^^
|
||||
error: 9: type mismatch: '^=' cannot operate on 'float', 'int'
|
||||
void xor_eq() { x ^= 1; }
|
||||
^^^^^^^
|
||||
error: 11: type mismatch: '>>' cannot operate on 'float', 'int'
|
||||
void shr() { x = x >> 1; }
|
||||
^^^^^^
|
||||
error: 12: type mismatch: '<<' cannot operate on 'float', 'int'
|
||||
void shl() { x = x << 1; }
|
||||
^^^^^^
|
||||
error: 13: type mismatch: '&' cannot operate on 'float', 'int'
|
||||
void and() { x = x & 1; }
|
||||
^^^^^
|
||||
error: 14: type mismatch: '|' cannot operate on 'float', 'int'
|
||||
void or() { x = x | 1; }
|
||||
^^^^^
|
||||
error: 15: type mismatch: '^' cannot operate on 'float', 'int'
|
||||
void xor() { x = x ^ 1; }
|
||||
^^^^^
|
||||
10 errors
|
||||
|
@ -1,13 +1,33 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 5: type mismatch: '>>=' cannot operate on 'float2x2', 'int'
|
||||
void shr_eq() { x >>= 1; }
|
||||
^^^^^^^
|
||||
error: 6: type mismatch: '<<=' cannot operate on 'float2x2', 'int'
|
||||
void shl_eq() { x <<= 1; }
|
||||
^^^^^^^
|
||||
error: 7: type mismatch: '&=' cannot operate on 'float2x2', 'int'
|
||||
void and_eq() { x &= 1; }
|
||||
^^^^^^^
|
||||
error: 8: type mismatch: '|=' cannot operate on 'float2x2', 'int'
|
||||
void or_eq() { x |= 1; }
|
||||
^^^^^^^
|
||||
error: 9: type mismatch: '^=' cannot operate on 'float2x2', 'int'
|
||||
void xor_eq() { x ^= 1; }
|
||||
^^^^^^^
|
||||
error: 11: type mismatch: '>>' cannot operate on 'float2x2', 'int'
|
||||
void shr() { x = x >> 1; }
|
||||
^^^^^^
|
||||
error: 12: type mismatch: '<<' cannot operate on 'float2x2', 'int'
|
||||
void shl() { x = x << 1; }
|
||||
^^^^^^
|
||||
error: 13: type mismatch: '&' cannot operate on 'float2x2', 'int'
|
||||
void and() { x = x & 1; }
|
||||
^^^^^
|
||||
error: 14: type mismatch: '|' cannot operate on 'float2x2', 'int'
|
||||
void or() { x = x | 1; }
|
||||
^^^^^
|
||||
error: 15: type mismatch: '^' cannot operate on 'float2x2', 'int'
|
||||
void xor() { x = x ^ 1; }
|
||||
^^^^^
|
||||
10 errors
|
||||
|
@ -1,13 +1,33 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 5: type mismatch: '>>=' cannot operate on 'float2', 'int'
|
||||
void shr_eq() { x >>= 1; }
|
||||
^^^^^^^
|
||||
error: 6: type mismatch: '<<=' cannot operate on 'float2', 'int'
|
||||
void shl_eq() { x <<= 1; }
|
||||
^^^^^^^
|
||||
error: 7: type mismatch: '&=' cannot operate on 'float2', 'int'
|
||||
void and_eq() { x &= 1; }
|
||||
^^^^^^^
|
||||
error: 8: type mismatch: '|=' cannot operate on 'float2', 'int'
|
||||
void or_eq() { x |= 1; }
|
||||
^^^^^^^
|
||||
error: 9: type mismatch: '^=' cannot operate on 'float2', 'int'
|
||||
void xor_eq() { x ^= 1; }
|
||||
^^^^^^^
|
||||
error: 11: type mismatch: '>>' cannot operate on 'float2', 'int'
|
||||
void shr() { x = x >> 1; }
|
||||
^^^^^^
|
||||
error: 12: type mismatch: '<<' cannot operate on 'float2', 'int'
|
||||
void shl() { x = x << 1; }
|
||||
^^^^^^
|
||||
error: 13: type mismatch: '&' cannot operate on 'float2', 'int'
|
||||
void and() { x = x & 1; }
|
||||
^^^^^
|
||||
error: 14: type mismatch: '|' cannot operate on 'float2', 'int'
|
||||
void or() { x = x | 1; }
|
||||
^^^^^
|
||||
error: 15: type mismatch: '^' cannot operate on 'float2', 'int'
|
||||
void xor() { x = x ^ 1; }
|
||||
^^^^^
|
||||
10 errors
|
||||
|
@ -1,28 +1,78 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: type mismatch: '+' cannot operate on 'bool', 'bool'
|
||||
bool2 add_boolean() { return false + true; }
|
||||
^^^^^^^^^^^^
|
||||
error: 2: type mismatch: '-' cannot operate on 'bool', 'bool'
|
||||
bool2 sub_boolean() { return false - true; }
|
||||
^^^^^^^^^^^^
|
||||
error: 3: type mismatch: '*' cannot operate on 'bool', 'bool'
|
||||
bool2 mul_boolean() { return false * true; }
|
||||
^^^^^^^^^^^^
|
||||
error: 4: type mismatch: '/' cannot operate on 'bool', 'bool'
|
||||
bool2 div_boolean() { return false / true; }
|
||||
^^^^^^^^^^^^
|
||||
error: 5: type mismatch: '%' cannot operate on 'bool', 'bool'
|
||||
bool2 mod_boolean() { return false % true; }
|
||||
^^^^^^^^^^^^
|
||||
error: 6: type mismatch: '<<' cannot operate on 'bool', 'bool'
|
||||
bool2 shl_boolean() { return false << true; }
|
||||
^^^^^^^^^^^^^
|
||||
error: 7: type mismatch: '>>' cannot operate on 'bool', 'bool'
|
||||
bool2 shr_boolean() { return false >> true; }
|
||||
^^^^^^^^^^^^^
|
||||
error: 8: '-' cannot operate on 'bool'
|
||||
bool2 neg_boolean() { return -false; }
|
||||
^^^^^^
|
||||
error: 9: '~' cannot operate on 'bool'
|
||||
bool2 bitnot_boolean() { return ~false; }
|
||||
^^^^^^
|
||||
error: 10: type mismatch: '&' cannot operate on 'bool', 'bool'
|
||||
bool2 bitand_boolean() { return false & true; }
|
||||
^^^^^^^^^^^^
|
||||
error: 11: type mismatch: '|' cannot operate on 'bool', 'bool'
|
||||
bool2 bitor_boolean() { return false | true; }
|
||||
^^^^^^^^^^^^
|
||||
error: 12: type mismatch: '^' cannot operate on 'bool', 'bool'
|
||||
bool2 bitxor_boolean() { return false ^ true; }
|
||||
^^^^^^^^^^^^
|
||||
error: 14: type mismatch: '+' cannot operate on 'bool2', 'bool2'
|
||||
bool2 add_boolean_vec() { return bool2(false, false) + bool2(true, true); }
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 15: type mismatch: '-' cannot operate on 'bool2', 'bool2'
|
||||
bool2 sub_boolean_vec() { return bool2(false, false) - bool2(true, true); }
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 16: type mismatch: '*' cannot operate on 'bool2', 'bool2'
|
||||
bool2 mul_boolean_vec() { return bool2(false, false) * bool2(true, true); }
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 17: type mismatch: '/' cannot operate on 'bool2', 'bool2'
|
||||
bool2 div_boolean_vec() { return bool2(false, false) / bool2(true, true); }
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 18: type mismatch: '%' cannot operate on 'bool2', 'bool2'
|
||||
bool2 mod_boolean_vec() { return bool2(false, false) % bool2(true, true); }
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 19: type mismatch: '<<' cannot operate on 'bool2', 'bool2'
|
||||
bool2 shl_boolean_vec() { return bool2(false, false) << bool2(true, true); }
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 20: type mismatch: '>>' cannot operate on 'bool2', 'bool2'
|
||||
bool2 shr_boolean_vec() { return bool2(false, false) >> bool2(true, true); }
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 21: '!' cannot operate on 'bool2'
|
||||
bool2 not_boolean_vec() { return !bool2(false, false); }
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
error: 22: '-' cannot operate on 'bool2'
|
||||
bool2 neg_boolean_vec() { return -bool2(false, false); }
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
error: 23: '~' cannot operate on 'bool2'
|
||||
bool2 bitnot_boolean_vec() { return ~bool2(false, false); }
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
error: 24: type mismatch: '&' cannot operate on 'bool2', 'bool2'
|
||||
bool2 bitand_boolean_vec() { return bool2(false, false) & bool2(true, true); }
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 25: type mismatch: '|' cannot operate on 'bool2', 'bool2'
|
||||
bool2 bitor_boolean_vec() { return bool2(false, false) | bool2(true, true); }
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 26: type mismatch: '^' cannot operate on 'bool2', 'bool2'
|
||||
bool2 bitxor_boolean_vec() { return bool2(false, false) ^ bool2(true, true); }
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
25 errors
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 3: break statement must be inside a loop or switch
|
||||
if (true) break;
|
||||
^^^^^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 3: not a function
|
||||
x();
|
||||
^^^
|
||||
1 error
|
||||
|
@ -1,24 +1,66 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 6: function 'if_only' can exit without returning a value
|
||||
int if_only() { if (variable == 1) return 0; }
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 7: function 'return_on_if_but_not_else' can exit without returning a value
|
||||
int return_on_if_but_not_else() { if (variable == 1) return 0; else variable *= 2; }
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 8: function 'return_on_else_but_not_if' can exit without returning a value
|
||||
int return_on_else_but_not_if() { if (variable == 1) variable *= 2; else return 1; }
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 10: function 'for_with_conditional_return' can exit without returning a value
|
||||
int for_with_conditional_return() { for (;;) { if (variable == 1) return 0; } }
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 11: function 'for_with_conditional_break' can exit without returning a value
|
||||
int for_with_conditional_break() { for (;;) { if (variable == 1) break; return 0; } }
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 12: function 'for_with_conditional_continue' can exit without returning a value
|
||||
int for_with_conditional_continue() { for (;;) { if (variable == 1) continue; return 0; } }
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 14: function 'do_with_conditional_return' can exit without returning a value
|
||||
bool do_with_conditional_return() { do { if (mystery == 1) return true; } while(true); }
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 15: function 'do_with_conditional_break' can exit without returning a value
|
||||
bool do_with_conditional_break() { do { if (mystery == 1) break; return true; } while(true); }
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 16: function 'do_with_conditional_continue' can exit without returning a value
|
||||
bool do_with_conditional_continue() { do { if (mystery == 1) continue; return true; } while(true); }
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 18: function 'bad_if_else_chain' can exit without returning a value
|
||||
bool bad_if_else_chain() {
|
||||
^...
|
||||
error: 32: function 'switch_empty' can exit without returning a value
|
||||
int switch_empty() {
|
||||
^...
|
||||
error: 36: function 'switch_with_no_default' can exit without returning a value
|
||||
int switch_with_no_default() {
|
||||
^...
|
||||
error: 43: function 'switch_with_break' can exit without returning a value
|
||||
int switch_with_break() {
|
||||
^...
|
||||
error: 55: continue statement cannot be used in a switch
|
||||
default: continue;
|
||||
^^^^^^^^
|
||||
error: 51: function 'switch_with_continue' can exit without returning a value
|
||||
int switch_with_continue() {
|
||||
^...
|
||||
error: 59: function 'switch_with_fallthrough_off_bottom' can exit without returning a value
|
||||
int switch_with_fallthrough_off_bottom() {
|
||||
^...
|
||||
error: 67: function 'switch_with_conditional_break' can exit without returning a value
|
||||
int switch_with_conditional_break() {
|
||||
^...
|
||||
error: 77: continue statement cannot be used in a switch
|
||||
case 1: if (mystery == 123) ; else continue; return 1;
|
||||
^^^^^^^^
|
||||
error: 75: function 'switch_with_conditional_continue' can exit without returning a value
|
||||
int switch_with_conditional_continue() {
|
||||
^...
|
||||
error: 83: function 'switch_with_conditional_if_then_return' can exit without returning a value
|
||||
int switch_with_conditional_if_then_return() {
|
||||
^...
|
||||
error: 90: function 'switch_with_conditional_break_then_fallthrough' can exit without returning a value
|
||||
int switch_with_conditional_break_then_fallthrough() {
|
||||
^...
|
||||
21 errors
|
||||
|
@ -1,19 +1,51 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 5: type mismatch: '==' cannot operate on 'float2', 'float'
|
||||
return v == f || v == m || m == f ||
|
||||
^^^^^^
|
||||
error: 5: type mismatch: '==' cannot operate on 'float2', 'float2x2'
|
||||
return v == f || v == m || m == f ||
|
||||
^^^^^^
|
||||
error: 5: type mismatch: '==' cannot operate on 'float2x2', 'float'
|
||||
return v == f || v == m || m == f ||
|
||||
^^^^^^
|
||||
error: 6: type mismatch: '==' cannot operate on 'float', 'float2'
|
||||
f == v || m == v || f == m ||
|
||||
^^^^^^
|
||||
error: 6: type mismatch: '==' cannot operate on 'float2x2', 'float2'
|
||||
f == v || m == v || f == m ||
|
||||
^^^^^^
|
||||
error: 6: type mismatch: '==' cannot operate on 'float', 'float2x2'
|
||||
f == v || m == v || f == m ||
|
||||
^^^^^^
|
||||
error: 7: type mismatch: '!=' cannot operate on 'float2', 'float'
|
||||
v != f || v != m || m != f ||
|
||||
^^^^^^
|
||||
error: 7: type mismatch: '!=' cannot operate on 'float2', 'float2x2'
|
||||
v != f || v != m || m != f ||
|
||||
^^^^^^
|
||||
error: 7: type mismatch: '!=' cannot operate on 'float2x2', 'float'
|
||||
v != f || v != m || m != f ||
|
||||
^^^^^^
|
||||
error: 8: type mismatch: '!=' cannot operate on 'float', 'float2'
|
||||
f != v || m != v || f != m ;
|
||||
^^^^^^
|
||||
error: 8: type mismatch: '!=' cannot operate on 'float2x2', 'float2'
|
||||
f != v || m != v || f != m ;
|
||||
^^^^^^
|
||||
error: 8: type mismatch: '!=' cannot operate on 'float', 'float2x2'
|
||||
f != v || m != v || f != m ;
|
||||
^^^^^^
|
||||
error: 14: type mismatch: '==' cannot operate on 'float2x2', 'float3x3'
|
||||
return m2 == m3 || m2 != m3;
|
||||
^^^^^^^^
|
||||
error: 14: type mismatch: '!=' cannot operate on 'float2x2', 'float3x3'
|
||||
return m2 == m3 || m2 != m3;
|
||||
^^^^^^^^
|
||||
error: 20: type mismatch: '==' cannot operate on 'float2', 'float3'
|
||||
return v2 == v3 || v2 != v3;
|
||||
^^^^^^^^
|
||||
error: 20: type mismatch: '!=' cannot operate on 'float2', 'float3'
|
||||
return v2 == v3 || v2 != v3;
|
||||
^^^^^^^^
|
||||
16 errors
|
||||
|
@ -1,6 +1,12 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: invalid arguments to 'float3' constructor (expected 3 scalars, but found 2)
|
||||
void construct_float3_from_float_float() { float3 x = float3(1.0, 2.0); }
|
||||
^^^^^^^^^^^^^^^^
|
||||
error: 2: invalid arguments to 'float3' constructor (expected 3 scalars, but found 4)
|
||||
void construct_float3_from_float_float_float_float() { float3 x = float3(1.0, 2.0, 3.0, 4.0); }
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 3: 'int3' is not a valid parameter to 'bool' constructor
|
||||
void construct_bool_from_int3() { bool x = bool(int3(77)); }
|
||||
^^^^^^^^^^^^^^
|
||||
3 errors
|
||||
|
@ -1,9 +1,21 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 5: expected 'int', but found 'float2x2'
|
||||
void construct_struct_from_float2x2() { Foo x = Foo(float2x2(0)); }
|
||||
^^^^^^^^^^^
|
||||
error: 6: 'Foo' is not a valid parameter to 'float' constructor
|
||||
void construct_float_from_struct() { float x = float(foo); }
|
||||
^^^^^^^^^^
|
||||
error: 7: 'Foo' is not a valid parameter to 'float2' constructor
|
||||
void construct_float2_from_struct() { float2 x = float2(foo); }
|
||||
^^^^^^^^^^^
|
||||
error: 8: 'Foo' is not a valid parameter to 'float2x2' constructor
|
||||
void construct_float2x2_from_struct() { float2x2 x = float2x2(foo); }
|
||||
^^^^^^^^^^^^^
|
||||
error: 9: '<INVALID>' is not a valid parameter to 'float2x2' constructor
|
||||
void construct_float2x2_from_type() { float2x2 x = float2x2(int); }
|
||||
^^^^^^^^^^^^^
|
||||
error: 10: '<INVALID>' is not a valid parameter to 'float2x2' constructor
|
||||
void construct_float2x2_from_function() { float2x2 x = float2x2(sqrt); }
|
||||
^^^^^^^^^^^^^^
|
||||
6 errors
|
||||
|
@ -1,5 +1,9 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 3: continue statement must be inside a loop
|
||||
continue;
|
||||
^^^^^^^^
|
||||
error: 8: continue statement must be inside a loop
|
||||
default: continue;
|
||||
^^^^^^^^
|
||||
2 errors
|
||||
|
@ -1,7 +1,15 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: division by zero
|
||||
int a = 1 / 0;
|
||||
^^^^^
|
||||
error: 2: division by zero
|
||||
float b = 1 / 0;
|
||||
^^^^^
|
||||
error: 3: division by zero
|
||||
float c = 1.0 / 0.0;
|
||||
^^^^^^^^^
|
||||
error: 4: division by zero
|
||||
float d = -67.0 / (3.0 - 3);
|
||||
^^^^^^^^^^^^^^^^^
|
||||
4 errors
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 2: expected 'bool', but found 'float2'
|
||||
do {} while (float2(1));
|
||||
^^^^^^^^^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 2: duplicate definition of void func()
|
||||
void func() {}
|
||||
^^^^^^^^^^^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: out location=0, index=0 is reserved for sk_FragColor
|
||||
layout (location=0, index=0) out half4 duplicateOutput;
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
1 error
|
||||
|
@ -1,6 +1,12 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 2: symbol 'x' was already defined
|
||||
int x;
|
||||
^^^^^
|
||||
error: 5: symbol 'func' was already defined
|
||||
void func() {
|
||||
^^^^^^^^^^^
|
||||
error: 6: symbol 'y' was already defined
|
||||
int y,y;
|
||||
^
|
||||
3 errors
|
||||
|
@ -1,5 +1,9 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: array size must be positive
|
||||
int disallowed_zero[0];
|
||||
^
|
||||
error: 2: array size must be positive
|
||||
int disallowed_negative[-1];
|
||||
^^
|
||||
2 errors
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: struct 'S' must contain at least one field
|
||||
struct S { };
|
||||
^^^^^^^^^^^^
|
||||
1 error
|
||||
|
@ -1,7 +1,15 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 3: unknown identifier 'x'
|
||||
void error_in_dead_else_body() { if (true) {} else x = 5; }
|
||||
^
|
||||
error: 4: unknown identifier 'x'
|
||||
void error_in_dead_if_body() { if (false) x = 5; }
|
||||
^
|
||||
error: 5: unknown identifier 'x'
|
||||
void error_in_dead_ternary_true_expr() { true ? 5 : x; }
|
||||
^
|
||||
error: 6: unknown identifier 'x'
|
||||
void error_in_dead_ternary_false_expr() { false ? x : 5; }
|
||||
^
|
||||
4 errors
|
||||
|
@ -1,5 +1,9 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 6: type mismatch: '%' cannot operate on 'float', 'float'
|
||||
void rem() { x = x % y; }
|
||||
^^^^^
|
||||
error: 7: type mismatch: '%=' cannot operate on 'float', 'float'
|
||||
void rem_eq() { x %= y; }
|
||||
^^^^^^
|
||||
2 errors
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: expected expression, but found 'for'
|
||||
void test_init_stmt_for() { for (for(;;);; ) {} }
|
||||
^^^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 2: expected 'bool', but found 'int'
|
||||
for (int x = 0; x; x++) {}
|
||||
^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: expected ')', but found 'x'
|
||||
void func(void x) {}
|
||||
^
|
||||
1 error
|
||||
|
@ -1,5 +1,9 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: no match for sin(int, int)
|
||||
void sin_int_int() { float x = sin(1, 2); }
|
||||
^^^^^^^^^
|
||||
error: 2: no match for sin(bool)
|
||||
void sin_bool() { float x = sin(true); }
|
||||
^^^^^^^^^
|
||||
2 errors
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 2: expected 'bool', but found 'int'
|
||||
if (3) {}
|
||||
^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: 'in' variables cannot use initializer expressions
|
||||
in float x = 1;
|
||||
^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 2: expected '(' to begin constructor invocation
|
||||
int;
|
||||
^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 2: expected '(' to begin function call
|
||||
mix;
|
||||
^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 2: expected an identifier, but found type 'float'
|
||||
float float;
|
||||
^^^^^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 2: type '$mat' is private
|
||||
$mat g;
|
||||
^^^^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 3: expected ';', but found 'float'
|
||||
} float;
|
||||
^^^^^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 3: unknown identifier 'x'
|
||||
} test[x];
|
||||
^
|
||||
1 error
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: 'out' is not permitted here
|
||||
uniform foo { out int x; };
|
||||
^^^
|
||||
1 error
|
||||
|
@ -1,5 +1,9 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: interface block 'S' must contain at least one member
|
||||
const S {};
|
||||
^^^^
|
||||
error: 2: interface block 'testBlock' must contain at least one member
|
||||
testBlock {} x[2];
|
||||
^^^^^^^^^^^^
|
||||
2 errors
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: global variable initializer must be a constant expression
|
||||
half4 c = blend_src_over(half4(1), half4(0));
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
1 error
|
||||
|
@ -1,16 +1,42 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 7: cannot assign to this expression
|
||||
void assign_to_literal() { 1 = 2; }
|
||||
^
|
||||
error: 8: cannot modify immutable variable 'u'
|
||||
void assign_to_uniform() { u = 0; }
|
||||
^
|
||||
error: 9: cannot modify immutable variable 'x'
|
||||
void assign_to_const() { const int x = 1; x = 0; }
|
||||
^
|
||||
error: 11: cannot assign to this expression
|
||||
void assign_to_const_swizzle() { const half4 x = half4(1); x.w = 0; }
|
||||
^^^
|
||||
error: 12: cannot write to the same swizzle field more than once
|
||||
void assign_to_repeated_swizzle() { half4 x; x.yy = half2(0); }
|
||||
^^^^
|
||||
error: 14: cannot modify immutable variable 'l'
|
||||
void assign_to_foldable_ternary_const_left() { const float l = 1; float r; (true ? l : r) = 0; }
|
||||
^^^^^^^^^^^^^^
|
||||
error: 15: cannot modify immutable variable 'r'
|
||||
void assign_to_foldable_ternary_const_right() { float l; const float r = 1; (false ? l : r) = 0; }
|
||||
^^^^^^^^^^^^^^^
|
||||
error: 16: cannot modify immutable variable 'l'
|
||||
void assign_to_foldable_ternary_const_both() { const float l = 1; const float r = 1; (true ? l : r) = 0; }
|
||||
^^^^^^^^^^^^^^
|
||||
error: 17: cannot assign to this expression
|
||||
void assign_to_unfoldable_ternary() { float l, r; (u > 0 ? l : r) = 0; }
|
||||
^^^^^^^^^^^^^^^
|
||||
error: 18: cannot assign to this expression
|
||||
void assign_to_unary_minus() { float x; -x = 0; }
|
||||
^^
|
||||
error: 21: cannot modify immutable variable 'x'
|
||||
void assign_to_const_param(const int x) { x = 0; }
|
||||
^
|
||||
error: 22: cannot modify immutable variable 'x'
|
||||
void assign_to_const_array_param(const int x[1]) { x[0] = 0; }
|
||||
^
|
||||
error: 23: cannot modify immutable variable 's'
|
||||
void assign_to_const_struct_param(const S s) { s.f = 0; }
|
||||
^
|
||||
13 errors
|
||||
|
@ -1,6 +1,12 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 4: cannot assign to this expression
|
||||
void test_a() { inc1(0); }
|
||||
^
|
||||
error: 5: cannot assign to this expression
|
||||
void test_b() { inc4(float4(0)); }
|
||||
^^^^^^^^^
|
||||
error: 6: cannot assign to this expression
|
||||
void test_c() { inc1(sqrt(1)); }
|
||||
^^^^^^^
|
||||
3 errors
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: invalid token
|
||||
💩
|
||||
^
|
||||
1 error
|
||||
|
@ -1,10 +1,24 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 3: '++' cannot operate on 'float4x4'
|
||||
void preincrement_matrix() { float4x4 x = float4x4(1); ++x; }
|
||||
^^^
|
||||
error: 4: '--' cannot operate on 'float3'
|
||||
void predecrement_vector() { float3 x = float3(1); --x; }
|
||||
^^^
|
||||
error: 5: '++' cannot operate on 'float4x4'
|
||||
void postincrement_matrix() { float4x4 x = float4x4(1); x++; }
|
||||
^^^
|
||||
error: 6: '--' cannot operate on 'float3'
|
||||
void postdecrement_vector() { float3 x = float3(1); x--; }
|
||||
^^^
|
||||
error: 7: '!' cannot operate on 'int'
|
||||
void not_integer() { int x = !12; }
|
||||
^^^
|
||||
error: 8: '+' cannot operate on 'Foo'
|
||||
void positive_struct() { Foo x = +bar; }
|
||||
^^^^
|
||||
error: 9: '-' cannot operate on 'Foo'
|
||||
void negative_struct() { Foo x = -bar; }
|
||||
^^^^
|
||||
7 errors
|
||||
|
@ -1,25 +1,69 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: layout qualifier 'origin_upper_left' is not permitted here
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 1: layout qualifier 'push_constant' is not permitted here
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 1: layout qualifier 'blend_support_all_equations' is not permitted here
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 1: layout qualifier 'color' is not permitted here
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 1: layout qualifier 'location' is not permitted here
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 1: layout qualifier 'offset' is not permitted here
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 1: layout qualifier 'binding' is not permitted here
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 1: layout qualifier 'index' is not permitted here
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 1: layout qualifier 'set' is not permitted here
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 1: layout qualifier 'builtin' is not permitted here
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 1: layout qualifier 'input_attachment_index' is not permitted here
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 16: layout qualifier 'origin_upper_left' is not permitted here
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 16: layout qualifier 'push_constant' is not permitted here
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 16: layout qualifier 'blend_support_all_equations' is not permitted here
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 16: layout qualifier 'color' is not permitted here
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 16: layout qualifier 'location' is not permitted here
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 16: layout qualifier 'offset' is not permitted here
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 16: layout qualifier 'binding' is not permitted here
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 16: layout qualifier 'index' is not permitted here
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 16: layout qualifier 'set' is not permitted here
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 16: layout qualifier 'builtin' is not permitted here
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 16: layout qualifier 'input_attachment_index' is not permitted here
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
22 errors
|
||||
|
@ -1,5 +1,9 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 4: layout qualifier 'binding' is not permitted here
|
||||
layout(binding=1) A y; // Not allowed
|
||||
^^^^^^^^^^^^^^^^^
|
||||
error: 5: layout qualifier 'set' is not permitted here
|
||||
layout(set=0) A z; // Not allowed
|
||||
^^^^^^^^^^^^^
|
||||
2 errors
|
||||
|
@ -1,5 +1,9 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 4: layout qualifier 'binding' is not permitted here
|
||||
layout(binding=1) A y; // Not allowed
|
||||
^^^^^^^^^^^^^^^^^
|
||||
error: 5: layout qualifier 'set' is not permitted here
|
||||
layout(set=0) A z; // Not allowed
|
||||
^^^^^^^^^^^^^
|
||||
2 errors
|
||||
|
@ -1,5 +1,9 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 2: layout qualifier 'binding' is not permitted on a struct field
|
||||
layout(binding = 1) int x; // Not allowed
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
error: 3: layout qualifier 'set' is not permitted on a struct field
|
||||
layout(set = 0) int y; // Not allowed
|
||||
^^^^^^^^^^^^^^^
|
||||
2 errors
|
||||
|
@ -1,5 +1,9 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 2: layout qualifier 'binding' is not permitted on a struct field
|
||||
layout(binding = 1) int x; // Not allowed
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
error: 3: layout qualifier 'set' is not permitted on a struct field
|
||||
layout(set = 0) int y; // Not allowed
|
||||
^^^^^^^^^^^^^^^
|
||||
2 errors
|
||||
|
@ -1,17 +1,45 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 14: layout qualifier 'origin_upper_left' appears more than once
|
||||
origin_upper_left,
|
||||
^^^^^^^^^^^^^^^^^
|
||||
error: 15: layout qualifier 'push_constant' appears more than once
|
||||
push_constant,
|
||||
^^^^^^^^^^^^^
|
||||
error: 16: layout qualifier 'blend_support_all_equations' appears more than once
|
||||
blend_support_all_equations,
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 17: layout qualifier 'color' appears more than once
|
||||
color,
|
||||
^^^^^
|
||||
error: 18: layout qualifier 'location' appears more than once
|
||||
location = 2,
|
||||
^^^^^^^^
|
||||
error: 19: layout qualifier 'offset' appears more than once
|
||||
offset = 2,
|
||||
^^^^^^
|
||||
error: 20: layout qualifier 'binding' appears more than once
|
||||
binding = 2,
|
||||
^^^^^^^
|
||||
error: 21: layout qualifier 'index' appears more than once
|
||||
index = 2,
|
||||
^^^^^
|
||||
error: 22: layout qualifier 'set' appears more than once
|
||||
set = 2,
|
||||
^^^
|
||||
error: 23: layout qualifier 'builtin' appears more than once
|
||||
builtin = 2,
|
||||
^^^^^^^
|
||||
error: 24: layout qualifier 'input_attachment_index' appears more than once
|
||||
input_attachment_index = 2
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
error: 1: 'layout(color)' is only permitted in runtime effects
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 1: 'layout(color)' is only permitted on 'uniform' variables
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
error: 1: 'layout(color)' is not permitted on variables of type 'float'
|
||||
layout (
|
||||
^^^^^^^^...
|
||||
14 errors
|
||||
|
@ -1,11 +1,27 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: index -1 out of range for 'half3x3'
|
||||
void half3x3_neg1() { half3x3 m; half3 v = m[-1]; }
|
||||
^^
|
||||
error: 5: index 3 out of range for 'half3x3'
|
||||
void half3x3_3() { half3x3 m; half3 v = m[3]; }
|
||||
^
|
||||
error: 6: index 4 out of range for 'half3x3'
|
||||
void half3x3_4() { half3x3 m; half3 v = m[4]; }
|
||||
^
|
||||
error: 7: index 1000000000 out of range for 'half3x3'
|
||||
void half3x3_huge() { half3x3 m; half3 v = m[1000000000]; }
|
||||
^^^^^^^^^^
|
||||
error: 9: index -1 out of range for 'half3x3'
|
||||
void half3x3_neg1_constidx() { half3x3 m; const int INDEX = -1; half3 v = m[INDEX]; }
|
||||
^^^^^
|
||||
error: 13: index 3 out of range for 'half3x3'
|
||||
void half3x3_3_constidx() { half3x3 m; const int INDEX = 3; half3 v = m[INDEX]; }
|
||||
^^^^^
|
||||
error: 14: index 4 out of range for 'half3x3'
|
||||
void half3x3_4_constidx() { half3x3 m; const int INDEX = 4; half3 v = m[INDEX]; }
|
||||
^^^^^
|
||||
error: 15: index 1000000000 out of range for 'half3x3'
|
||||
void half3x3_huge_constidx() { half3x3 m; const int INDEX = 1000000000; half3 v = m[INDEX]; }
|
||||
^^^^^
|
||||
8 errors
|
||||
|
@ -1,11 +1,27 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: index -1 out of range for 'half2x4'
|
||||
void half2x4_neg1() { half2x4 m; half4 v = m[-1]; }
|
||||
^^
|
||||
error: 4: index 2 out of range for 'half2x4'
|
||||
void half2x4_2() { half2x4 m; half4 v = m[2]; }
|
||||
^
|
||||
error: 5: index 3 out of range for 'half2x4'
|
||||
void half2x4_3() { half2x4 m; half4 v = m[3]; }
|
||||
^
|
||||
error: 6: index 4 out of range for 'half2x4'
|
||||
void half2x4_4() { half2x4 m; half4 v = m[4]; }
|
||||
^
|
||||
error: 7: index 1000000000 out of range for 'half2x4'
|
||||
void half2x4_huge() { half2x4 m; half4 v = m[1000000000]; }
|
||||
^^^^^^^^^^
|
||||
error: 9: index -1 out of range for 'half4x2'
|
||||
void half4x2_neg1() { half4x2 m; half2 v = m[-1]; }
|
||||
^^
|
||||
error: 14: index 4 out of range for 'half4x2'
|
||||
void half4x2_4() { half4x2 m; half2 v = m[4]; }
|
||||
^
|
||||
error: 15: index 1000000000 out of range for 'half4x2'
|
||||
void half4x2_huge() { half4x2 m; half2 v = m[1000000000]; }
|
||||
^^^^^^^^^^
|
||||
8 errors
|
||||
|
@ -1,5 +1,9 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 11: index -1 out of range for 'float3x3'
|
||||
float3 undefined = indexMatrix(-1) + indexMatrix(3);
|
||||
^^
|
||||
error: 11: index 3 out of range for 'float3x3'
|
||||
float3 undefined = indexMatrix(-1) + indexMatrix(3);
|
||||
^
|
||||
2 errors
|
||||
|
@ -1,7 +1,15 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 4: 'half3x3' is not a valid parameter to 'half' constructor; use '[0][0]' instead
|
||||
half testScalar = half (testMatrix3x3);
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
error: 5: 'half3x3' is not a valid parameter to 'half2' constructor
|
||||
half2 testVec2 = half2(testMatrix3x3);
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
error: 6: 'half3x3' is not a valid parameter to 'half3' constructor
|
||||
half3 testVec3 = half3(testMatrix3x3);
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
error: 7: 'half3x3' is not a valid parameter to 'half4' constructor
|
||||
half4 testVec4 = half4(testMatrix3x3);
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
4 errors
|
||||
|
@ -1,6 +1,12 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 4: 'half2x2' is not a valid parameter to 'bool' constructor
|
||||
bool testScalar = bool (testMatrix2x2);
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
error: 5: 'half2x2' is not a valid parameter to 'bool2' constructor
|
||||
bool2 testVec2 = bool2(testMatrix2x2);
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
error: 6: 'half2x2' is not a valid parameter to 'bool3' constructor
|
||||
bool3 testVec3 = bool3(testMatrix2x2);
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
3 errors
|
||||
|
@ -1,6 +1,12 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 4: 'half2x2' is not a valid parameter to 'int' constructor
|
||||
int testScalar = int (testMatrix2x2);
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
error: 5: 'half2x2' is not a valid parameter to 'int2' constructor
|
||||
int2 testVec2 = int2(testMatrix2x2);
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
error: 6: 'half2x2' is not a valid parameter to 'int3' constructor
|
||||
int3 testVec3 = int3(testMatrix2x2);
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
3 errors
|
||||
|
@ -1,6 +1,12 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 4: 'half2x2' is not a valid parameter to 'half' constructor; use '[0][0]' instead
|
||||
half testScalar = half (testMatrix2x2);
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
error: 5: 'half2x2' is not a valid parameter to 'half2' constructor
|
||||
half2 testVec2 = half2(testMatrix2x2);
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
error: 6: 'half2x2' is not a valid parameter to 'half3' constructor
|
||||
half3 testVec3 = half3(testMatrix2x2);
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
3 errors
|
||||
|
@ -1,30 +1,84 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 16: type mismatch: '=' cannot operate on 'int', 'float'
|
||||
void i_eq_float_literal_disallowed() { i = 1.0; }
|
||||
^^^^^^^
|
||||
error: 17: type mismatch: '=' cannot operate on 'int', 'float'
|
||||
void i_eq_f_disallowed() { i = f; }
|
||||
^^^^^
|
||||
error: 18: type mismatch: '=' cannot operate on 'float', 'int'
|
||||
void f_eq_i_disallowed() { f = i; }
|
||||
^^^^^
|
||||
error: 19: type mismatch: '+' cannot operate on 'int', 'float'
|
||||
void i_plus_float_literal_disallowed() { i + 1.0; }
|
||||
^^^^^^^
|
||||
error: 20: type mismatch: '-' cannot operate on 'int', 'float'
|
||||
void i_minus_float_literal_disallowed() { i - 1.0; }
|
||||
^^^^^^^
|
||||
error: 21: type mismatch: '*' cannot operate on 'int', 'float'
|
||||
void i_mul_float_literal_disallowed() { i * 1.0; }
|
||||
^^^^^^^
|
||||
error: 22: type mismatch: '/' cannot operate on 'int', 'float'
|
||||
void i_div_float_literal_disallowed() { i / 1.0; }
|
||||
^^^^^^^
|
||||
error: 23: type mismatch: '+' cannot operate on 'float', 'int'
|
||||
void float_literal_plus_i_disallowed() { 1.0 + i; }
|
||||
^^^^^^^
|
||||
error: 24: type mismatch: '-' cannot operate on 'float', 'int'
|
||||
void float_literal_minus_i_disallowed() { 1.0 - i; }
|
||||
^^^^^^^
|
||||
error: 25: type mismatch: '*' cannot operate on 'float', 'int'
|
||||
void float_literal_mul_i_disallowed() { 1.0 * i; }
|
||||
^^^^^^^
|
||||
error: 26: type mismatch: '/' cannot operate on 'float', 'int'
|
||||
void float_literal_div_i_disallowed() { 1.0 / i; }
|
||||
^^^^^^^
|
||||
error: 27: type mismatch: '+' cannot operate on 'int', 'float'
|
||||
void i_plus_f_disallowed() { i + f; }
|
||||
^^^^^
|
||||
error: 28: type mismatch: '-' cannot operate on 'int', 'float'
|
||||
void i_minus_f_disallowed() { i - f; }
|
||||
^^^^^
|
||||
error: 29: type mismatch: '*' cannot operate on 'int', 'float'
|
||||
void i_mul_f_disallowed() { i * f; }
|
||||
^^^^^
|
||||
error: 30: type mismatch: '/' cannot operate on 'int', 'float'
|
||||
void i_div_f_disallowed() { i / f; }
|
||||
^^^^^
|
||||
error: 31: type mismatch: '+' cannot operate on 'float', 'int'
|
||||
void f_plus_i_disallowed() { f + i; }
|
||||
^^^^^
|
||||
error: 32: type mismatch: '-' cannot operate on 'float', 'int'
|
||||
void f_minus_i_disallowed() { f - i; }
|
||||
^^^^^
|
||||
error: 33: type mismatch: '*' cannot operate on 'float', 'int'
|
||||
void f_mul_i_disallowed() { f * i; }
|
||||
^^^^^
|
||||
error: 34: type mismatch: '/' cannot operate on 'float', 'int'
|
||||
void f_div_i_disallowed() { f / i; }
|
||||
^^^^^
|
||||
error: 35: unknown identifier 'u'
|
||||
void f_plus_u_disallowed() { f + u; }
|
||||
^
|
||||
error: 36: unknown identifier 'u'
|
||||
void f_minus_u_disallowed() { f - u; }
|
||||
^
|
||||
error: 37: unknown identifier 'u'
|
||||
void f_mul_u_disallowed() { f * u; }
|
||||
^
|
||||
error: 38: unknown identifier 'u'
|
||||
void f_div_u_disallowed() { f / u; }
|
||||
^
|
||||
error: 39: unknown identifier 'u'
|
||||
void i_plus_u_disallowed() { i + u; }
|
||||
^
|
||||
error: 40: unknown identifier 'u'
|
||||
void i_minus_u_disallowed() { i - u; }
|
||||
^
|
||||
error: 41: unknown identifier 'u'
|
||||
void i_mul_u_disallowed() { i * u; }
|
||||
^
|
||||
error: 42: unknown identifier 'u'
|
||||
void i_div_u_disallowed() { i / u; }
|
||||
^
|
||||
27 errors
|
||||
|
@ -1,32 +1,90 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 17: type mismatch: '=' cannot operate on 'uint', 'float'
|
||||
void u_eq_float_literal_disallowed() { u = 1.0; }
|
||||
^^^^^^^
|
||||
error: 18: type mismatch: '=' cannot operate on 'int', 'uint'
|
||||
void i_eq_u_disallowed() { i = u; }
|
||||
^^^^^
|
||||
error: 19: type mismatch: '=' cannot operate on 'float', 'uint'
|
||||
void f_eq_u_disallowed() { f = u; }
|
||||
^^^^^
|
||||
error: 20: type mismatch: '=' cannot operate on 'uint', 'int'
|
||||
void u_eq_i_disallowed() { u = i; }
|
||||
^^^^^
|
||||
error: 21: type mismatch: '=' cannot operate on 'uint', 'float'
|
||||
void u_eq_f_disallowed() { u = f; }
|
||||
^^^^^
|
||||
error: 22: type mismatch: '+' cannot operate on 'uint', 'float'
|
||||
void u_plus_float_literal_disallowed() { u + 1.0; }
|
||||
^^^^^^^
|
||||
error: 23: type mismatch: '-' cannot operate on 'uint', 'float'
|
||||
void u_minus_float_literal_disallowed() { u - 1.0; }
|
||||
^^^^^^^
|
||||
error: 24: type mismatch: '*' cannot operate on 'uint', 'float'
|
||||
void u_mul_float_literal_disallowed() { u * 1.0; }
|
||||
^^^^^^^
|
||||
error: 25: type mismatch: '/' cannot operate on 'uint', 'float'
|
||||
void u_div_float_literal_disallowed() { u / 1.0; }
|
||||
^^^^^^^
|
||||
error: 26: type mismatch: '+' cannot operate on 'float', 'uint'
|
||||
void float_literal_plus_u_disallowed() { 1.0 + u; }
|
||||
^^^^^^^
|
||||
error: 27: type mismatch: '-' cannot operate on 'float', 'uint'
|
||||
void float_literal_minus_u_disallowed() { 1.0 - u; }
|
||||
^^^^^^^
|
||||
error: 28: type mismatch: '*' cannot operate on 'float', 'uint'
|
||||
void float_literal_mul_u_disallowed() { 1.0 * u; }
|
||||
^^^^^^^
|
||||
error: 29: type mismatch: '/' cannot operate on 'float', 'uint'
|
||||
void float_literal_div_u_disallowed() { 1.0 / u; }
|
||||
^^^^^^^
|
||||
error: 30: type mismatch: '+' cannot operate on 'uint', 'float'
|
||||
void u_plus_f_disallowed() { u + f; }
|
||||
^^^^^
|
||||
error: 31: type mismatch: '-' cannot operate on 'uint', 'float'
|
||||
void u_minus_f_disallowed() { u - f; }
|
||||
^^^^^
|
||||
error: 32: type mismatch: '*' cannot operate on 'uint', 'float'
|
||||
void u_mul_f_disallowed() { u * f; }
|
||||
^^^^^
|
||||
error: 33: type mismatch: '/' cannot operate on 'uint', 'float'
|
||||
void u_div_f_disallowed() { u / f; }
|
||||
^^^^^
|
||||
error: 34: type mismatch: '+' cannot operate on 'float', 'uint'
|
||||
void f_plus_u_disallowed() { f + u; }
|
||||
^^^^^
|
||||
error: 35: type mismatch: '-' cannot operate on 'float', 'uint'
|
||||
void f_minus_u_disallowed() { f - u; }
|
||||
^^^^^
|
||||
error: 36: type mismatch: '*' cannot operate on 'float', 'uint'
|
||||
void f_mul_u_disallowed() { f * u; }
|
||||
^^^^^
|
||||
error: 37: type mismatch: '/' cannot operate on 'float', 'uint'
|
||||
void f_div_u_disallowed() { f / u; }
|
||||
^^^^^
|
||||
error: 38: type mismatch: '+' cannot operate on 'int', 'uint'
|
||||
void i_plus_u_disallowed() { i + u; }
|
||||
^^^^^
|
||||
error: 39: type mismatch: '-' cannot operate on 'int', 'uint'
|
||||
void i_minus_u_disallowed() { i - u; }
|
||||
^^^^^
|
||||
error: 40: type mismatch: '*' cannot operate on 'int', 'uint'
|
||||
void i_mul_u_disallowed() { i * u; }
|
||||
^^^^^
|
||||
error: 41: type mismatch: '/' cannot operate on 'int', 'uint'
|
||||
void i_div_u_disallowed() { i / u; }
|
||||
^^^^^
|
||||
error: 42: type mismatch: '+' cannot operate on 'uint', 'int'
|
||||
void u_plus_i_disallowed() { u + i; }
|
||||
^^^^^
|
||||
error: 43: type mismatch: '-' cannot operate on 'uint', 'int'
|
||||
void u_minus_i_disallowed() { u - i; }
|
||||
^^^^^
|
||||
error: 44: type mismatch: '*' cannot operate on 'uint', 'int'
|
||||
void u_mul_i_disallowed() { u * i; }
|
||||
^^^^^
|
||||
error: 45: type mismatch: '/' cannot operate on 'uint', 'int'
|
||||
void u_div_i_disallowed() { u / i; }
|
||||
^^^^^
|
||||
29 errors
|
||||
|
@ -1,8 +1,18 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 2: modifier 'const' is not permitted on a struct field
|
||||
const float a;
|
||||
^^^^^
|
||||
error: 3: modifier 'uniform' is not permitted on a struct field
|
||||
uniform int b;
|
||||
^^^^^^^
|
||||
error: 4: modifier 'flat' is not permitted on a struct field
|
||||
flat half4 c;
|
||||
^^^^
|
||||
error: 5: modifier 'noperspective' is not permitted on a struct field
|
||||
noperspective float4 d;
|
||||
^^^^^^^^^^^^^
|
||||
error: 6: modifier 'inout' is not permitted on a struct field
|
||||
inout bool e;
|
||||
^^^^^
|
||||
5 errors
|
||||
|
@ -1,4 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 3: field 'var' was already defined in the same struct ('Varyings')
|
||||
float var;
|
||||
^^^
|
||||
1 error
|
||||
|
@ -1,5 +1,9 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 3: field 'f' was already defined in the same interface block ('IB')
|
||||
float f;
|
||||
^
|
||||
error: 7: symbol 'f' was already defined
|
||||
IB2 { float f; };
|
||||
^^^^^^^^
|
||||
2 errors
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user