question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Errors using asserted reference in getter

See original GitHub issue

On 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:open
  • Created 8 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
lucaswerkmeistercommented, Jul 20, 2016

tsk, @quintesse, you shouldn’t be so quick to assume! 😛

1reaction
quintessecommented, Jul 20, 2016

Tsk, @chochos , you shouldn’t lie! 😉

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found