Errors using asserted reference in getter
See original GitHub issueOn the JVM:
shared class C() {
value si = "si" of Anything;
assert (is String | Integer si);
shared String | Integer x => si; // error
// Cannot find symbol
// symbol: variable si
}
shared void run() {
print(C().x);
}
On JS:
simple-1.0.0.js:30
return $3;
^
ReferenceError: $3 is not defined
at m$1.atr$.mod [as x] (/Users/jvasileff/Dropbox/Repos/jv/simple/modules/simple/1.0.0/simple-1.0.0.js:30:8)
at run (/Users/jvasileff/Dropbox/Repos/jv/simple/modules/simple/1.0.0/simple-1.0.0.js:39:14)
at [eval]:1:282
at Object.exports.runInThisContext (vm.js:74:17)
at Object.<anonymous> ([eval]-wrapper:6:22)
at Module._compile (module.js:460:26)
at evalScript (node.js:431:25)
at startup (node.js:90:7)
at node.js:814:3
ceylon run-js: Node process exited with non-zero exit code: 1
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Java Assertion in getter method - Stack Overflow
Assertions can be turned on and off to run a program, and are off by default. If they are turned on and their...
Read more >Eclipse property refactoring should update getter / setter ...
I've managed to overcome this issue by patching eclipse's RenameFieldProcessor.java and replacing "Assert.isTrue(groupDeclarations.length > 0);" ...
Read more >Bug Patterns - Error Prone
Reference equality of boxed primitive types is usually not useful, as they are value objects, and it is bug-prone, as instances are cached...
Read more >How to spy on a property (getter or setter) with Jasmine
Here we have the ES6 class syntax, with a getter property. The get fullName() syntax binds an object property fullName to a function...
Read more >Lombok annotated class - rename member (with getter-setter)
When using Lombok @Data annotation, and I rename member variable with option of renaming getter/setter and update references, I get assertation error.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
tsk, @quintesse, you shouldn’t be so quick to assume! 😛
Tsk, @chochos , you shouldn’t lie! 😉