Closed stevemessick closed 9 years ago
I could not reproduce the problem being reported. The code snippet will not compile as is, but I wouldn't have expected it to. I tried to add the minimal additional wrapper code to remove other errors, but couldn't reproduce the error the user was seeing. For what it's worth, here's my modified test case:
var view;
WeatherController() { view = new WeatherView(); view.close.on.click.add(hideError); } void hideError(event) { view.hideError(); }
class WeatherView {}
Added NeedsInfo label.
Added AssumedStale label.
Weird error when compiling to JavaScript: WeatherController() { view = new WeatherView(); view.close.on.click.add(hideError); }
void hideError(event) { view.hideError(); } The hideError bit won't compile, while other similar calls do. Instead I had to use this workaround: WeatherController() { view = new WeatherView(); view.close.on.click.add((event) { hideError(); }); }
void hideError() { view.hideError(); }
//////////////////////////////////////////////////////////////////////////////////// Editor: 10597 OS: Linux - amd64 (3.0.0-12-generic) JVM: 1.6.0_26
SDK installed: true Dartium installed: true ////////////////////////////////////////////////////////////////////////////////////
!ENTRY com.google.dart.tools.ui 4 10001 2012-08-31 12:44:36.438 !MESSAGE Internal Error !STACK 1 Dart Model Exception: Core Exception [code 0] Failed to parse weather.dart.js at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveUnit(DartCompilerUtilities.java:757) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveUnit(DartCompilerUtilities.java:733) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveUnit(DartCompilerUtilities.java:697) at com.google.dart.tools.ui.internal.text.editor.DartEditor.getAST(DartEditor.java:2042) at com.google.dart.tools.ui.internal.text.editor.CompilationUnitEditor.reconciled(CompilationUnitEditor.java:1277) at com.google.dart.tools.ui.internal.text.dart.DartReconcilingStrategy.reconcile(DartReconcilingStrategy.java:199) at com.google.dart.tools.ui.internal.text.dart.DartReconcilingStrategy.reconcile(DartReconcilingStrategy.java:103) at com.google.dart.tools.ui.internal.text.functions.CompositeReconcilingStrategy.reconcile(CompositeReconcilingStrategy.java:91) at com.google.dart.tools.ui.internal.text.functions.DartCompositeReconcilingStrategy.reconcile(DartCompositeReconcilingStrategy.java:125) at org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.java:77) at com.google.dart.tools.ui.internal.text.functions.DartReconciler.process(DartReconciler.java:385) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206) Caused by: java.lang.NullPointerException at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.secureAnalyzeLibrary(DartCompilerUtilities.java:846) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities$ResolverRunnable.run(DartCompilerUtilities.java:468) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities$CompilerRunner.runSafe(DartCompilerUtilities.java:100) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveUnit(DartCompilerUtilities.java:755) ... 11 more Caused by: org.eclipse.core.runtime.CoreException: Failed to parse weather.dart.js at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveUnit(DartCompilerUtilities.java:761) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveUnit(DartCompilerUtilities.java:733) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveUnit(DartCompilerUtilities.java:697) at com.google.dart.tools.ui.internal.text.editor.DartEditor.getAST(DartEditor.java:2042) at com.google.dart.tools.ui.internal.text.editor.CompilationUnitEditor.reconciled(CompilationUnitEditor.java:1277) at com.google.dart.tools.ui.internal.text.dart.DartReconcilingStrategy.reconcile(DartReconcilingStrategy.java:199) at com.google.dart.tools.ui.internal.text.dart.DartReconcilingStrategy.reconcile(DartReconcilingStrategy.java:103) at com.google.dart.tools.ui.internal.text.functions.CompositeReconcilingStrategy.reconcile(CompositeReconcilingStrategy.java:91) at com.google.dart.tools.ui.internal.text.functions.DartCompositeReconcilingStrategy.reconcile(DartCompositeReconcilingStrategy.java:125) at org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.java:77) at com.google.dart.tools.ui.internal.text.functions.DartReconciler.process(DartReconciler.java:385) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206) Caused by: java.lang.NullPointerException at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.secureAnalyzeLibrary(DartCompilerUtilities.java:846) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities$ResolverRunnable.run(DartCompilerUtilities.java:468) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities$CompilerRunner.runSafe(DartCompilerUtilities.java:100) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveUnit(DartCompilerUtilities.java:755) ... 11 more !SUBENTRY 1 com.google.dart.tools.core 4 0 2012-08-31 12:44:36.438 !MESSAGE Failed to parse weather.dart.js !STACK 0 java.lang.NullPointerException at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.secureAnalyzeLibrary(DartCompilerUtilities.java:846) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities$ResolverRunnable.run(DartCompilerUtilities.java:468) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities$CompilerRunner.runSafe(DartCompilerUtilities.java:100) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveUnit(DartCompilerUtilities.java:755) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveUnit(DartCompilerUtilities.java:733) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveUnit(DartCompilerUtilities.java:697) at com.google.dart.tools.ui.internal.text.editor.DartEditor.getAST(DartEditor.java:2042) at com.google.dart.tools.ui.internal.text.editor.CompilationUnitEditor.reconciled(CompilationUnitEditor.java:1277) at com.google.dart.tools.ui.internal.text.dart.DartReconcilingStrategy.reconcile(DartReconcilingStrategy.java:199) at com.google.dart.tools.ui.internal.text.dart.DartReconcilingStrategy.reconcile(DartReconcilingStrategy.java:103) at com.google.dart.tools.ui.internal.text.functions.CompositeReconcilingStrategy.reconcile(CompositeReconcilingStrategy.java:91) at com.google.dart.tools.ui.internal.text.functions.DartCompositeReconcilingStrategy.reconcile(DartCompositeReconcilingStrategy.java:125) at org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.java:77) at com.google.dart.tools.ui.internal.text.functions.DartReconciler.process(DartReconciler.java:385) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206)
!ENTRY com.google.dart.tools.ui 4 10001 2012-08-31 12:46:05.306 !MESSAGE Internal Error !STACK 1 Dart Model Exception: Core Exception [code 0] Failed to parse weather.dart.js at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveUnit(DartCompilerUtilities.java:757) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveUnit(DartCompilerUtilities.java:733) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveUnit(DartCompilerUtilities.java:697) at com.google.dart.tools.ui.internal.text.editor.DartEditor.getAST(DartEditor.java:2042) at com.google.dart.tools.ui.internal.text.editor.CompilationUnitEditor.reconciled(CompilationUnitEditor.java:1277) at com.google.dart.tools.ui.internal.text.dart.DartReconcilingStrategy.reconcile(DartReconcilingStrategy.java:199) at com.google.dart.tools.ui.internal.text.dart.DartReconcilingStrategy.reconcile(DartReconcilingStrategy.java:103) at com.google.dart.tools.ui.internal.text.functions.CompositeReconcilingStrategy.reconcile(CompositeReconcilingStrategy.java:91) at com.google.dart.tools.ui.internal.text.functions.DartCompositeReconcilingStrategy.reconcile(DartCompositeReconcilingStrategy.java:125) at org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.java:77) at com.google.dart.tools.ui.internal.text.functions.DartReconciler.process(DartReconciler.java:385) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206) Caused by: java.lang.NullPointerException at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.secureAnalyzeLibrary(DartCompilerUtilities.java:846) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities$ResolverRunnable.run(DartCompilerUtilities.java:468) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities$CompilerRunner.runSafe(DartCompilerUtilities.java:100) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveUnit(DartCompilerUtilities.java:755) ... 11 more Caused by: org.eclipse.core.runtime.CoreException: Failed to parse weather.dart.js at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveUnit(DartCompilerUtilities.java:761) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveUnit(DartCompilerUtilities.java:733) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveUnit(DartCompilerUtilities.java:697) at com.google.dart.tools.ui.internal.text.editor.DartEditor.getAST(DartEditor.java:2042) at com.google.dart.tools.ui.internal.text.editor.CompilationUnitEditor.reconciled(CompilationUnitEditor.java:1277) at com.google.dart.tools.ui.internal.text.dart.DartReconcilingStrategy.reconcile(DartReconcilingStrategy.java:199) at com.google.dart.tools.ui.internal.text.dart.DartReconcilingStrategy.reconcile(DartReconcilingStrategy.java:103) at com.google.dart.tools.ui.internal.text.functions.CompositeReconcilingStrategy.reconcile(CompositeReconcilingStrategy.java:91) at com.google.dart.tools.ui.internal.text.functions.DartCompositeReconcilingStrategy.reconcile(DartCompositeReconcilingStrategy.java:125) at org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.java:77) at com.google.dart.tools.ui.internal.text.functions.DartReconciler.process(DartReconciler.java:385) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206) Caused by: java.lang.NullPointerException at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.secureAnalyzeLibrary(DartCompilerUtilities.java:846) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities$ResolverRunnable.run(DartCompilerUtilities.java:468) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities$CompilerRunner.runSafe(DartCompilerUtilities.java:100) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveUnit(DartCompilerUtilities.java:755) ... 11 more !SUBENTRY 1 com.google.dart.tools.core 4 0 2012-08-31 12:46:05.306 !MESSAGE Failed to parse weather.dart.js !STACK 0 java.lang.NullPointerException at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.secureAnalyzeLibrary(DartCompilerUtilities.java:846) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities$ResolverRunnable.run(DartCompilerUtilities.java:468) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities$CompilerRunner.runSafe(DartCompilerUtilities.java:100) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveUnit(DartCompilerUtilities.java:755) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveUnit(DartCompilerUtilities.java:733) at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveUnit(DartCompilerUtilities.java:697) at com.google.dart.tools.ui.internal.text.editor.DartEditor.getAST(DartEditor.java:2042) at com.google.dart.tools.ui.internal.text.editor.CompilationUnitEditor.reconciled(CompilationUnitEditor.java:1277) at com.google.dart.tools.ui.internal.text.dart.DartReconcilingStrategy.reconcile(DartReconcilingStrategy.java:199) at com.google.dart.tools.ui.internal.text.dart.DartReconcilingStrategy.reconcile(DartReconcilingStrategy.java:103) at com.google.dart.tools.ui.internal.text.functions.CompositeReconcilingStrategy.reconcile(CompositeReconcilingStrategy.java:91) at com.google.dart.tools.ui.internal.text.functions.DartCompositeReconcilingStrategy.reconcile(DartCompositeReconcilingStrategy.java:125) at org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.java:77) at com.google.dart.tools.ui.internal.text.functions.DartReconciler.process(DartReconciler.java:385) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206)