Let compiler fail if unsafe field was not resolve instead to produce corrupt output.

This commit is contained in:
Volker Berlin 2023-02-12 22:22:28 +01:00
parent bc16b18083
commit e485e149bd
No known key found for this signature in database
GPG Key ID: 988423EF815BE4CB
2 changed files with 11 additions and 0 deletions

View File

@ -201,6 +201,14 @@ class FunctionManager {
return state.alias == null ? name : state.alias;
}
/**
* If the function manager is finish
* @return the finish flag
*/
boolean isFinish() {
return isFinish;
}
/**
* Mark the a function as scanned in the prepare phase. This should only occur with needed functions.
*

View File

@ -472,6 +472,9 @@ class UnsafeManager {
}
}
if( state == null ) {
if( functions.isFinish() ) {
throw new RuntimeException( name.signatureName );
}
// we are in the scan phase. The static code was not scanned yet.
return "";
}