Permalink
Browse files

Update out-dated warning

  • Loading branch information...
PseudoKnight committed Dec 13, 2017
1 parent 50ada0f commit 36b4ad33d6b30ddece01878fbfb9943f0899cffd
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/main/java/com/laytonsmith/core/functions/EventBinding.java
@@ -197,10 +197,9 @@ public ParseTree optimizeDynamic(Target t, List<ParseTree> children, FileOptions
throw new CREInsufficientArgumentsException("bind accepts 5 or more parameters", t);
}
if (!children.get(0).isConst()) {
// This ability may be removed in the future, to allow for better compilation checks of event type, once objects are added.
// We'll add this warning to gauge impact.
CHLog.GetLogger().Log(CHLog.Tags.COMPILER, LogLevel.WARNING, "Use of dynamic bind. This may be removed in the future, please"
+ " contact the developers to provide feedback if this affects you.", t);
// Const event name allows for better compilation checks of event type, once objects are added.
// This will throw an exception when linking, so let's give a more specific message here
throw new ConfigCompileException("Event names must be constant in bind().", t);
}
return null;
}

0 comments on commit 36b4ad3

Please sign in to comment.