mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-06 09:17:42 +02:00
Fixing issue #1782
This patch establishes "nan", "inf" and "-inf" as valid values for tl::Variant, so corresponding PCell parameters can be serialized and are properly managed.
This commit is contained in:
@@ -361,6 +361,10 @@ module RBA
|
||||
|
||||
def param(name, type, description, args = {})
|
||||
|
||||
if ! args.is_a?(Hash)
|
||||
raise("Too many positional arguments for 'param' (3 expected) - use named arguments for default value etc.")
|
||||
end
|
||||
|
||||
if name !~ /^[_A-Za-z]\w*$/
|
||||
raise "Invalid parameter name #{name} (needs to be a word)"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user